[AJUDA] Sobre Comando
#4

pawn Код:
//news
enum pInfo
{
    pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];


//CommandText
new idx,cmd[256],tmp[256],para1;
    cmd = strtok(cmdtext, idx);
   
    if(strcmp(cmd, "/tapa", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
        SendClientMessage(playerid, 0xBFC0C2FF, "USE: /tapa [ID/Nome]");
        return 1;
        }
        new plid;
        new Float:shealth;
        new Float:slx, Float:sly, Float:slz;
        plid = ReturnUser(tmp);
        if (PlayerInfo[playerid][pAdmin] >=1)
        {
        if(IsPlayerConnected(plid))
        {
        if(plid != INVALID_PLAYER_ID)
        {
        GetPlayerHealth(plid, shealth);
        SetPlayerHealth(plid, shealth-5);
        GetPlayerPos(plid, slx, sly, slz);
        SetPlayerPos(plid, slx, sly, slz+5);
        PlayerPlaySound(plid, 1130, slx, sly, slz+5);
        }
        }
        }
        else
        {
        SendClientMessage(playerid, 0xB4B5B7FF, "Vocк Nгo й Um Admin!");
        }
        }
        return 1;
    }
Reply


Messages In This Thread
[AJUDA] Sobre Comando - by CristoferBahr - 14.10.2011, 03:47
Re: [AJUDA] Sobre Comando - by xFernando_xD - 14.10.2011, 04:00
Re: [AJUDA] Sobre Comando - by Jason` - 14.10.2011, 04:15
Re: [AJUDA] Sobre Comando - by .CrazZy._.[De] - 14.10.2011, 04:30
Re: [AJUDA] Sobre Comando - by guilhermeghc@hotmail.com - 21.01.2012, 11:21

Forum Jump:


Users browsing this thread: 1 Guest(s)