SetPlayerPos Not working....
#4

Well your code needs some serious indentation, it's already becoming hard to read and it's only a few lines long! Also your usage of SetPlayerPos is wrong, you're setting the position of player 264.78? That doesn't make sense, look at my example:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/enter",cmdtext))
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 2935.96, 1842.19, 15.80))
    {
        SetPlayerPos(playerid, 264.78, 77.62, 1001.04);
        return 1;
    }
    return 0;
}
So then you're passing the playerid of the person that typed the command which is available in this callback, do you see what I mean?

You can keep using the shorthand if statement in this case, but I recommend using brackets to again make it structurally easier to read, like so:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/enter",cmdtext))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 2935.96, 1842.19, 15.80))
        {
            SetPlayerPos(playerid, 264.78, 77.62, 1001.04);
        }
        return 1;
    }
    return 0;
}
Additionally if you want to change the players angle, you need to use SetPlayerFacingAngle, as SetPlayerPos only accepts the X Y Z co-ordinates.
Reply


Messages In This Thread
SetPlayerPos Not working.... - by Alex_Obando - 01.03.2011, 21:19
Re: SetPlayerPos Not working.... - by grand.Theft.Otto - 01.03.2011, 21:21
Re: SetPlayerPos Not working.... - by blackwave - 01.03.2011, 21:21
Re: SetPlayerPos Not working.... - by JaTochNietDan - 01.03.2011, 21:23
Respuesta: SetPlayerPos Not working.... - by Alex_Obando - 01.03.2011, 21:26
Re: SetPlayerPos Not working.... - by grand.Theft.Otto - 01.03.2011, 21:34
Respuesta: SetPlayerPos Not working.... - by Alex_Obando - 01.03.2011, 21:39
Re: SetPlayerPos Not working.... - by JaTochNietDan - 01.03.2011, 21:40
Respuesta: SetPlayerPos Not working.... - by Alex_Obando - 01.03.2011, 22:09
Re: SetPlayerPos Not working.... - by grand.Theft.Otto - 01.03.2011, 22:16

Forum Jump:


Users browsing this thread: 1 Guest(s)