PutPlayerInVehicle Problem
#7

Here's a command which puts player in vehicle according to the vehicle id input by the user on /getin command.
Usage: /getin [vehicleid]
pawn Код:
CMD:getin(playerid, params[])
{
 new vid, Float:xp, Float:yp, Float:zp;
 if(sscanf(params, "i", vid)) return SendClientMessage(playerid, -1, "Usage: /getin [vehicleid]");
 if(IsPlayerInAnyVehicle(playerid)) return RemovePlayerFromVehicle(playerid);
 GetPlayerPos(playerid, xp, yp, zp);
 SetVehiclePos(vid, xp, yp, zp+3);
 PutPlayerInVehicle(playerid, vid, 1);
 return 1;
}
Edit:late.. :/
Reply


Messages In This Thread
PutPlayerInVehicle Problem - by Buzzbomb - 13.12.2012, 16:13
Re: PutPlayerInVehicle Problem - by park4bmx - 13.12.2012, 16:16
Re: PutPlayerInVehicle Problem - by Buzzbomb - 13.12.2012, 16:34
Re: PutPlayerInVehicle Problem - by Threshold - 13.12.2012, 16:42
Re: PutPlayerInVehicle Problem - by Buzzbomb - 13.12.2012, 16:50
Re: PutPlayerInVehicle Problem - by park4bmx - 13.12.2012, 16:58
Re: PutPlayerInVehicle Problem - by Lordzy - 13.12.2012, 17:03
Re: PutPlayerInVehicle Problem - by Buzzbomb - 13.12.2012, 17:08

Forum Jump:


Users browsing this thread: 4 Guest(s)