23.11.2010, 19:14
Which is line 123?
Anyway, do not forget to add 'new Saved[MAX_PLAYERS];' at the top of your script... Here is it some more idented
Anyway, do not forget to add 'new Saved[MAX_PLAYERS];' at the top of your script... Here is it some more idented
pawn Код:
if(!strcmp("/loadpos",cmdtext,true))
{
if(Saved[playerid] == 0) return SendClientMessage(playerid,0xFF0D13FF,"ERROR: You have not yet saved a location. (/savepos)");
else if(GetPlayerState(playerid) == 2)
{
SendClientMessage(playerid,0xFF0D13FF,"Position loaded.");
SetVehiclePos(GetPlayerVehicleID(playerid),SavedPos[playerid][0],SavedPos[playerid][1],SavedPos[playerid][2]);
}
else
{
SetPlayerPos(playerid,SavedPos[playerid][0],SavedPos[playerid][1],SavedPos[playerid][2]);
SendClientMessage(playerid,0xFF0D13FF,"Position loaded.");
}
return 1;
}
if(!strcmp("/savepos",cmdtext,true))
{
GetPlayerPos(playerid,SavedPos[playerid][0],SavedPos[playerid][1],SavedPos[playerid][2]);
Saved[playerid] = 1;
SendClientMessage(playerid,0xFF0D13FF,"Position saved.");
return 1;
}