[AJUDA]Comando
#5

Quote:
Originally Posted by Cristhian
Посмотреть сообщение
pawn Код:
#include <sscanf2>
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new params[100 char];
    new id;
    unformat(cmdtext, "s[50]S( )[100]",cmd,params);
   
    if(strcmp(cmd, "/tirarhosp", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1) //se o kra for admin .-.
        {
            if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /tirarhosp [id]");
            if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVБLIDO");
            new pos[3];
            GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerPos(id, pos[0], pos[1], pos[2]);
            SendClientMessage(id, -1, "Vocк foi retirado do hospital!");
            SendClientMessage(playerid, -1, "Vocк retirou alguйm do hospital com sucesso!");
            return 1;
        }
    }
    return 0;
}
EXEMPLO /\
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new params[100 char];
    new id;
    unformat(cmdtext, "s[50]S( )[100]",cmd,params);
   
    if(strcmp(cmd, "/tirarhosp", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1) //se o kra for admin .-.
        {
            if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /tirarhosp [id]");
            if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVБLIDO");
            sairhosp(id);
            return 1;
        }
    }
    return 0;
}
ou /\
й sу vc adaptar o comando para sua preferencia
Porfavor se nao for pedir muito pode colocar uma explicaзгo para eu entender melhor o comando Obrigado.
Reply


Messages In This Thread
[AJUDA]Comando /tirarhosp - by WalkerXD - 17.12.2011, 16:24
Re: [AJUDA]Comando - by .Skool_. - 17.12.2011, 16:49
Re: [AJUDA]Comando - by WalkerXD - 17.12.2011, 16:55
Re: [AJUDA]Comando - by Cristhian - 17.12.2011, 17:08
Re: [AJUDA]Comando - by WalkerXD - 17.12.2011, 17:19
Re: [AJUDA]Comando - by Cristhian - 17.12.2011, 17:25
Re: [AJUDA]Comando - by [O.z]Caroline - 17.12.2011, 17:34
Re: [AJUDA]Comando - by WalkerXD - 17.12.2011, 18:02
Re: [AJUDA]Comando - by WalkerXD - 18.12.2011, 17:32
Re: [AJUDA]Comando - by Cristhian - 18.12.2011, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)