20.02.2013, 07:12
So the topic says all,is there any cmd that when a player do /lvget he will get in his last car purchased by him.I mean teleport his car to that place where the player is.Is any command exist for it?
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;
here's an example
pawn Код:
|