• Welcome to Vice City Multiplayer.
 

PutDirectlyInVehicle didn't work?

Started by theway, March 21, 2011, 08:18:28 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

theway

PutDirectlyInVehicle(playerid,vehicleid)

work?

What should i do

yazeen

Use gups command

/c puttovehicle [playerid] [vehicleid]

theway


Dawood136


else if (strcmp(cmd, "puttovehicle", true) == 0) {
new snick[256], plr, vehicle[256], szMsg[256];
snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), vehicle = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"sethp")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else if (!strlen(vehicle)) SendClientMessage(playerid,COLOR_GREEN,"USAGE: /c puttovehicle [Nick/ID] [VehicleID]");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s teleported:[ %s ] to vehicle:[ %d ]",gPlayers[playerid],gPlayers[plr],strval(vehicle));
SendClientMessageToAll(COLOR_GREEN,szMsg);
PutPlayerInVehicle(plr,strval(vehicle));
}
return 1;
}


use this
Signed,
Dawood Sahi
DSS RPG Owner/Leader

yazeen

Quote from: Dawood136 on March 21, 2011, 11:37:43 AM

else if (strcmp(cmd, "puttovehicle", true) == 0) {
new snick[256], plr, vehicle[256], szMsg[256];
snick = strtok(cmdtext, idx), plr = FindPlayerIDFromString(snick), vehicle = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"sethp")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else if (!strlen(vehicle)) SendClientMessage(playerid,COLOR_GREEN,"USAGE: /c puttovehicle [Nick/ID] [VehicleID]");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
format(szMsg,sizeof(szMsg),"Admin %s teleported:[ %s ] to vehicle:[ %d ]",gPlayers[playerid],gPlayers[plr],strval(vehicle));
SendClientMessageToAll(COLOR_GREEN,szMsg);
PutPlayerInVehicle(plr,strval(vehicle));
}
return 1;
}

use this only for gups