06.11.2010, 17:46
Hey guys. I have a save and loadpos system. Savepos works perfectly but loadpos doesnt. It teleports player where it is, but if player is in vehicle the vehicle doesnt teleport with player. How do you fix it? This is my code:
Код:
if(strcmp(cmdtext, "/s", true) == 0) { GetPlayerFacingAngle(playerid, Float:storea[playerid]); stored[playerid] = 0; storeint[playerid] = GetPlayerInterior(playerid); GetPlayerPos(playerid, Float:storex[playerid], Float:storey[playerid], Float:storez[playerid]); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Twoja pozycja została zapisana. Aby ją wczytaćwpisz /l."); stored[playerid] = 1; return 1; } if(strcmp(cmdtext, "/l", true) == 0) { if(stored[playerid] == 1) { SetPlayerInterior(playerid, storeint[playerid]); SetPlayerPos(playerid, storex[playerid],storey[playerid],storez[playerid]); SetPlayerFacingAngle(playerid, storea[playerid]); SetCameraBehindPlayer(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Wczytałeś swoją pozycję."); } else return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pierw musisz zapisać pozycje przez wpisywanie /s."); return 1; }