Setting Spawn From PlayerInfo.
#1

Hey,

I understand how this would be done:
pawn Код:
if(PlayerInfo[playerid][pFirstSpawn] = 1)
    {
        SetPlayerPos(playerid(PlayerInfo[playerid][pSpawn]));
    }
Could someone explain please? these are the errors:
Код:
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\gamemodes\LSRP.pwn(156) : warning 211: possibly unintended assignment
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\gamemodes\LSRP.pwn(158) : error 012: invalid function call, not a valid address
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\gamemodes\LSRP.pwn(158) : warning 215: expression has no effect
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\gamemodes\LSRP.pwn(158) : error 001: expected token: ";", but found ")"
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\gamemodes\LSRP.pwn(158) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\gamemodes\LSRP.pwn(158) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

you need 4 parameters for the SetPlayerPos function
playerid, X Coord, Y Coord, Z Coord

So you need either an array with 3 fields, or just 3 variables which are storing the x, y and z coord

and it's like "playerid, x, y, z" and now "player(x, y, z)"
Reply
#3

And also:
pawn Код:
if(PlayerInfo[playerid][pFirstSpawn] == 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)