Error on SetPlayerPos
#1

pawn Код:
sw.pwn(672) : warning 202: number of arguments does not match definition
SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859,292.6273);
pawn Код:
sw.pwn(681) : warning 202: number of arguments does not match definition
SetPlayerPos(playerid,2528.0120,-1650.0964,14.4368,116.5171);
This is what it is from
pawn Код:
case DIALOG_TEAMS:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(listitem == 0)
                {
                    SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859,292.6273);
                    ResetPlayerWeapons(playerid);
                    SetPlayerSkin(playerid, 176);
                    GivePlayerWeapon(playerid, 34,80);
                    SetPlayerColor(playerid, COLOR_BLUE);
                    SpawnPlayer(playerid);
                }
                if(listitem == 1)
                {
                    SetPlayerPos(playerid,2528.0120,-1650.0964,14.4368,116.5171);
                    ResetPlayerWeapons(playerid);
                    SetPlayerSkin(playerid, 19);
                    GivePlayerWeapon(playerid, 34,80);
                    SetPlayerColor(playerid, COLOR_RED);
                    SpawnPlayer(playerid);
                }
            }
        }
Reply
#2

you have too much parameters !
SetPlayerPos only contains playerid,X,Y,Z
Reply
#3

But if you see: "Number of arguments does not match definition."
Why not look it up on the samp wiki?
Reply
#4

change
pawn Код:
SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859,292.6273);
To

pawn Код:
SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859);
pawn Код:
SetPlayerPos(playerid, x,y,z);
Reply
#5

Hey guys I appreciate you're help but I decided to do some digging and found out that this code is really what I need
SetSpawnInfo(playerid,0,176,2156.3208,-1708.1588,15.0859,89.9102,34,80,0,0,0,0);
Reply
#6

If you want to do this with SetPlayerPos, you gotta do it like this:
SetPlayerPos(playerid, x,y,z);
SetPlayerFacingAngle(playerid, angle);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)