How to get the player In his last vehicle that he spawned
#3

here's an example

pawn Код:
new Lastid[MAX_PLAYERS];

public OnPlayerExitVehicle(playerid,vehicleid)
{
Lastid[playerid] = vehicleid;
}
CMD:lvget(playerid,params[])
{
if(Lastid[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You haven't left any vehicles yet!");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetVehiclePos(Lastid[playerid],x+3,y,z);
SendClientMessage(playerid,COLOR_GREEN,"The last vehicle you exited was teleported to you!");
return 1;
It would be something like this
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)