little help
#8

Quote:
Originally Posted by Youice
Посмотреть сообщение
I already made this before! but what happened is::

I receive this error::

Код:
error 017: undefined symbol "X"
lol : )

thats why I made this "public BotPos"
Try this then:
pawn Код:
CMD:findbot(playerid, params[])
{
    new Float:X,Float:Y,Float:Z;
    if(IsPlayerAdmin(playerid))
    {
        for(new b=0; b<MAX_PLAYERS; b++)
        {
            if(IsPlayerNPC(b))
            {
                GetPlayerPos(b, X, Y, Z);
            }
        }
        SetPlayerPos(i, X, Y, Z);
        SendClientMessage(i, -1, "You arrived successfully");
        return 1;
    }
    else return SendClientMessage(playerid, -1, "You are not authorized to use that command!");
}
It should work.. and there's no need to loop through the players to make sure they're admin, playerid is already defined in the cmd.
Reply


Messages In This Thread
little help - by Youice - 30.04.2012, 11:22
Re: little help - by Youice - 30.04.2012, 11:48
Re: little help - by Jack_Leslie - 30.04.2012, 11:49
Re: little help - by Youice - 30.04.2012, 11:54
Re: little help - by Mean - 30.04.2012, 11:58
Re: little help - by Jack_Leslie - 30.04.2012, 12:00
Re: little help - by Youice - 30.04.2012, 12:05
Re: little help - by Jack_Leslie - 30.04.2012, 12:08
Re: little help - by Mean - 30.04.2012, 12:09
Re: little help - by Jack_Leslie - 30.04.2012, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)