SA-MP Forums Archive
[AJUDA] Comando /darkit - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Comando /darkit (/showthread.php?tid=354766)



[AJUDA] Comando /darkit - The_G0dFather - 27.06.2012

Bom o comando /darkit estб bugado o kit vai para o ADM que usa o kit!
pawn Код:
if(strcmp(cmd,"/darkit",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darkit [id]");
                return true;
            }
            new playa;
            playa = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SendClientMessage(playerid, COLOR_YELLOW, "[Kit Ecko] Vocк pegou o kit de armas ecko!");
                        SetPlayerArmour(playerid, 100.0);
                        SetPlayerHealth(playerid, 100.0);
                        GivePlayerWeapon(playerid, 25, 999);
                        GivePlayerWeapon(playerid, 24, 999);
                        GivePlayerWeapon(playerid, 31, 999);
                        GivePlayerWeapon(playerid, 29, 999);
                        GivePlayerWeapon(playerid, 34, 999);
                        format(string, 256, "[AVISO]O ADM %s usou o /kitecko em %s.",sendername,giveplayer);
                        ABroadCast(COLOR_LIGHTRED,string,1);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando!");
                return true;
            }
        }
        return true;
    }



Re: [AJUDA] Comando /darkit - Jason` - 27.06.2012

pawn Код:
if(strcmp(cmd,"/darkit",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darkit [id]");
                return true;
            }
            new playa;
            playa = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        SendClientMessage(playa, COLOR_YELLOW, "[Kit Ecko] Vocк pegou o kit de armas ecko!");
                        SetPlayerArmour(playa, 100.0);
                        SetPlayerHealth(playa, 100.0);
                        GivePlayerWeapon(playa, 25, 999);
                        GivePlayerWeapon(playa, 24, 999);
                        GivePlayerWeapon(playa, 31, 999);
                        GivePlayerWeapon(playa, 29, 999);
                        GivePlayerWeapon(playa, 34, 999);
                        format(string, 256, "[AVISO]O ADM %s usou o /kitecko em %s.",sendername,giveplayer);
                        ABroadCast(COLOR_LIGHTRED,string,1);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando!");
                return true;
            }
        }
        return true;
    }