30.06.2012, 05:10
Hello,
Ive made a simple /save and /load position script. After i save a position. Then i load it i go there without the car i was sitting in. So i was wondering who can tweak this so when i load a position i saved i go there with the car i was in.
Ive made a simple /save and /load position script. After i save a position. Then i load it i go there without the car i was sitting in. So i was wondering who can tweak this so when i load a position i saved i go there with the car i was in.
Код:
if(strcmp(cmdtext, "/s", true) ==0) { if(IsPlayerConnected(playerid)) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); SetPVarFloat(playerid,"xpos",x); // save X POS SetPVarFloat(playerid,"ypos",y); // save Y POS SetPVarFloat(playerid,"zpos",z); // save Z POS SetPVarInt(playerid,"int",GetPlayerInterior(playerid));//get interior SendClientMessage(playerid,0x33AA33AA,"Position Saved! Use /l To Get back To It!,"); } return 1; } if (strcmp("/l", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, GetPVarFloat(playerid,"xpos"), GetPVarFloat(playerid,"ypos"), GetPVarFloat(playerid,"zpos")); SetPlayerInterior(playerid, GetPVarInt(playerid,"int")); SendClientMessage(playerid, 0x33AA33AA, "Loaded Saved Position."); return 1; }