HELP REP++++++++++
#8

Quote:
Originally Posted by Gogeta101
Посмотреть сообщение
What means pragma un used params and i will start fixing them like /goto [ID]
The code that I have left should work!

Program unused "params" means that I'm not using that parameter in the command.

On your next command if you use parameters.

Works with zcmd and sscanf, are very good.

pawn Код:
command(goto, playerid, params[])
{
    if(Player[playerid][pAdmin] >= 1)
    {
        if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, "How to use: /goto [playerid/name].");
        if(IsPlayerConnected(params[0]) && params[0] != INVALID_PLAYER_ID)
        {
            if(params[0] != playerid)
            {
                new Float:Pos[3];
                GetPlayerPos(params[0], Pos[0], Pos[1], Pos[2]);
                SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
                SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(params[0]));
                SetPlayerInterior(playerid, GetPlayerInterior(params[0]));
            }
            else
            {
                SendClientMessage(playerid, -1, "You can't go toward yourself.");
            }
        }
        else
        {
            SendClientMessage(playerid, -1, "Player disconnected.");
        }
    }
    else
    {
        SendClientMessage(playerid, -1, "You need to be administrator to use this command.");
    }
    return 1;
}
Reply


Messages In This Thread
HELP REP++++++++++ - by Gogeta101 - 29.08.2014, 00:45
Re: HELP REP++++++++++ - by Jefff - 29.08.2014, 01:05
Re: HELP REP++++++++++ - by JuanStone - 29.08.2014, 01:25
Re: HELP REP++++++++++ - by Don_Cage - 29.08.2014, 02:19
Re: HELP REP++++++++++ - by Gogeta101 - 29.08.2014, 10:43
Re: HELP REP++++++++++ - by Gogeta101 - 29.08.2014, 12:42
Re: HELP REP++++++++++ - by Clad - 29.08.2014, 12:47
Re: HELP REP++++++++++ - by JuanStone - 30.08.2014, 00:48

Forum Jump:


Users browsing this thread: 1 Guest(s)