SA-MP Forums Archive
stunt - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: stunt (/showthread.php?tid=142987)



stunt - jaksimaksi - 20.04.2010

hi i want to make that when player types /stunt he got to the last stunt where he was.
example: im writing /stunt and get to the first stunt, i pass about 3 stunts, and disconnect from the server, then write /stunt and get to the stun 3 zone
I have cp's, command:

Код:
dcmd_stunt(playerid,params[])
{
#pragma unused params
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "cant with car");
new string[64],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof pName);
format(string, sizeof string, "is in stunt", pName);
SendClientMessageToAll(ORRANGE, string);
CreateCheckpoint(GLOBAL_OWNER_ID, STUNT, -2553.9128,730.9096,45.0234,1.5);
SetCheckpointVirtualWorld(STUNT, 5);
StartCheckpointSeeking();
new stuntcar = CreateVehicle(522,-2402.2542,734.2985,35.0156,89.0493,0,0,20);
SetVehicleVirtualWorld(stuntcar, 5);
SetPlayerVirtualWorld(playerid,5);
SetPlayerPos(playerid,-2402.2542,734.2985,35.0156);
PutPlayerInVehicle(playerid, stuntcar, 0);
return 1;
}



Re: stunt - DJDhan - 20.04.2010

maybe you can write the coordinates the player in a file when he exits and then when he types /stunt then get the coordinates from the file and teleport him to hat point.Or maybe if you have stunt areas... you can use the name instead. hope it helps


Re: stunt - jaksimaksi - 21.04.2010

i know that, i want to make that when player disconnects coordinates gets saved in dini file, but i dont know how, can someone give me a example?


Re: stunt - jaksimaksi - 22.04.2010

someone?