Pos saver help
#6

Quote:
Originally Posted by CmZxC
View Post
pawn Code:
if(positionx[playerid] != 0 && positiony[playerid] !=0 && positionz[playerid] != 0); {
SetPlayerPos(playerid, 1676.8462, 1447.7908, 10.7833);
}
else {
SetPlayerPos(playerid,positionx,positiony,position z);
}
maybe switch != 0 into == 0..
you check if its not 0 then you spawn him at your default spawn.

AND you have to add
pawn Code:
positionx = dini_Int(Pos(playerid), "PositionX");
positiony = dini_Int(Pos(playerid), "PositionY");
positionz = dini_Int(Pos(playerid), "PositionZ");
at the spawn too.

so result :

pawn Code:
public OnPlayerSpawn(playerid)
{
        positionx = dini_Int(Pos(playerid), "PositionX");
        positiony = dini_Int(Pos(playerid), "PositionY");
        positionz = dini_Int(Pos(playerid), "PositionZ");
        if(positionx[playerid] != 0 && positiony[playerid] !=0 && positionz[playerid] != 0);
        {
                SetPlayerPos(playerid,positionx,positiony,position z);
        }
        else
        {
                SetPlayerPos(playerid, 1676.8462, 1447.7908, 10.7833);
        }
        return 1;
}
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : error 028: invalid subscript (not an array or too many subscripts): "positionx"
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : warning 215: expression has no effect
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : error 001: expected token: ";", but found "]"
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\Desktop\New folder\pawno\pos.pwn(51) : fatal error 107: too many error messages on one line
its giving me these errors
Reply


Messages In This Thread
Pos saver help - by jueix - 13.01.2012, 17:23
Re: Pos saver help - by smokeweed - 13.01.2012, 17:55
Re: Pos saver help - by IceCube! - 13.01.2012, 17:59
Re: Pos saver help - by jueix - 13.01.2012, 19:59
Re: Pos saver help - by CmZxC - 13.01.2012, 20:09
Re: Pos saver help - by jueix - 13.01.2012, 22:07

Forum Jump:


Users browsing this thread: 2 Guest(s)