PutPlayerInVehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PutPlayerInVehicle (
/showthread.php?tid=591079)
PutPlayerInVehicle -
xClown - 07.10.2015
How I putplayerinvehicle when he type this command?
PHP код:
YCMD:veh(playerid, params[], help)
{
#pragma unused help
new id, string[40], Float: K[3], c1,c2;
if(PlayerInfo[playerid][xAdmin] < 3) return SCM(playerid, -1, "{A80000}[Error]: {585858}You are not an administrator!");
{
if(sscanf(params,"iii", id, c1, c2)) return SendClientMessage(playerid, -1, "/veh [ID] [Col1] [Col2]");
GetPlayerPos(playerid,K[0], K[1], K[2]);
format(string, sizeof(string), "Vehicle ID %i", id);
SendClientMessage(playerid, -1, string);
CreateVehicle(id, K[0], K[1], K[2], 90, c1, c2, 90);
}
return true;
}
Thanks in advance. Rep+
Re: PutPlayerInVehicle -
d1git - 07.10.2015
PHP код:
PutPlayerInVehicle(playerid, vehicleid, seatid);
PHP код:
YCMD:veh(playerid, params[], help)
{
#pragma unused help
new id, string[40], Float: K[3], c1,c2;
if(PlayerInfo[playerid][xAdmin] < 3) return SCM(playerid, -1, "{A80000}[Error]: {585858}You are not an administrator!");
{
if(sscanf(params,"iii", id, c1, c2)) return SendClientMessage(playerid, -1, "/veh [ID] [Col1] [Col2]");
GetPlayerPos(playerid,K[0], K[1], K[2]);
format(string, sizeof(string), "Vehicle ID %i", id);
SendClientMessage(playerid, -1, string);
CreateVehicle(id, K[0], K[1], K[2], 90, c1, c2, 90);
PutPlayerInVehicle(playerid, id, 0);
}
return true;
}
Re: PutPlayerInVehicle -
xClown - 07.10.2015
Edit: Thanks, i dont see you edit post.