/saveloc and /loadloc command errors!
#2

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

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;
}
Reply


Messages In This Thread
/saveloc and /loadloc command errors! - by Kitten_Blind - 23.11.2010, 19:13
Re: /saveloc and /loadloc command errors! - by Jochemd - 23.11.2010, 19:14
Re: /saveloc and /loadloc command errors! - by Kitten_Blind - 23.11.2010, 19:34
Re: /saveloc and /loadloc command errors! - by FreshDoubleX - 23.11.2010, 19:53
Re: /saveloc and /loadloc command errors! - by Kitten_Blind - 23.11.2010, 19:54

Forum Jump:


Users browsing this thread: 1 Guest(s)