06.11.2010, 18:06
Heres a copy and paste out of my command:
edit it to your variables
Код:
if (strcmp("/gotopos", cmdtext, true, 10) == 0) { if(!stored[playerid]) return SendClientMessage(playerid,YELLOW,"[ERROR]Please /savepos first then /gotopos"); { SendClientMessage(playerid,YELLOW,"You have teleported to your last saved position."); if(IsPlayerInAnyVehicle(playerid)) { new vehid = GetPlayerVehicleID(playerid); SetVehiclePos(vehid,Xpos[playerid],Ypos[playerid],Zpos[playerid]); SetVehicleZAngle(vehid,Apos[playerid]); LinkVehicleToInterior(vehid,Interior[playerid]); return 1; } else { SetPlayerPos(playerid,Xpos[playerid],Ypos[playerid],Zpos[playerid]); SetPlayerFacingAngle(playerid,Apos[playerid]); SetPlayerInterior(playerid,Interior[playerid]); return 1; } } }