Author Topic: PutDirectlyInVehicle didn't work?  (Read 2796 times)

0 Members and 1 Guest are viewing this topic.

Offline theway

  • Street Thug
  • *
  • Posts: 20
    • View Profile
PutDirectlyInVehicle didn't work?
« on: March 21, 2011, 11:18:28 am »
PutDirectlyInVehicle(playerid,vehicleid)

work?

What should i do

yazeen

  • Guest
Re: PutDirectlyInVehicle didn't work?
« Reply #1 on: March 21, 2011, 11:22:33 am »
Use gups command

/c puttovehicle [playerid] [vehicleid]

Offline theway

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: PutDirectlyInVehicle didn't work?
« Reply #2 on: March 21, 2011, 11:27:11 am »
can work ?

Offline Dawood136

  • Street Thug
  • *
  • Posts: 28
    • View Profile
Re: PutDirectlyInVehicle didn't work?
« Reply #3 on: March 21, 2011, 02:37:43 pm »
Code: [Select]
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

  • Guest
Re: PutDirectlyInVehicle didn't work?
« Reply #4 on: March 21, 2011, 02:59:20 pm »
Code: [Select]
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