[Ajuda] /assaltar
#2

Quote:
Originally Posted by NuTShoT
Посмотреть сообщение
Olб, bom dia!

Gostaria que vocкs me ajudassem.
meu comando assalta o player mais proximo. Porйm gostaria que ele assaltasse o player tipo. (/assaltar [id]) e nгo o mais proximo.

pawn Код:
if(strcmp(cmdtext, "/assaltar", true) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(i, X, Y, Z);
            if(PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
            && PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
            && PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
            && PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
            && PlayerInfo[playerid][pMembro] != 19 && PlayerInfo[playerid][pLider] != 19
            && PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20
            && PlayerInfo[playerid][pMembro] != 21 && PlayerInfo[playerid][pLider] != 21
            && PlayerInfo[playerid][pMembro] != 26 && PlayerInfo[playerid][pLider] != 26
            && PlayerInfo[playerid][pLider] != 29 && PlayerInfo[playerid][pLider] != 31
            && PlayerInfo[playerid][pMembro] != 29 && PlayerInfo[playerid][pMembro] != 31
            && GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 12
            && GetPlayerOrg(playerid) != 13 && GetPlayerOrg(playerid) != 15
            && PlayerInfo[playerid][pMembro] != 38 && PlayerInfo[playerid][pLider] != 38
            && GetPlayerOrg(playerid) != 23)
            {
                SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar!");
                return true;
            }
            if(IsPlayerInRangeOfPoint(playerid, 3, X, Y, Z))
            {
                new string[128], Nome[MAX_PLAYER_NAME], Name[MAX_PLAYER_NAME], rand = random(4500)+500;
                GetPlayerName(i, Nome, sizeof(Nome));
                GetPlayerName(playerid, Name, sizeof(Name));
                format(string, sizeof(string), "Vocк assaltou o jogador %s e roubou R$ %d,00 dele!", Nome, rand);
                SendClientMessage(playerid, -1, string);
                format(string, sizeof(string), "Vocк foi assaltado pelo jogador %s e ele te roubou %d!", Name, rand);
                SendClientMessage(i, -1, string);
                GivePlayerMoney(playerid, rand);
                GivePlayerMoney(i, -rand);
            }
        }
        return 1;
    }
Vlw!
Se й RP/RPG para que o /assaltar id? assim vocк pode assaltar um cara que se encontra no outro lado do mapa amigo?
Reply


Messages In This Thread
/assaltar - by NuTShoT - 05.07.2013, 12:32
Respuesta: /assaltar - by Knight97 - 05.07.2013, 12:35
Re: /assaltar - by NuTShoT - 05.07.2013, 12:59
Re: /assaltar - by Knight97 - 05.07.2013, 13:06
Re: /assaltar - by NuTShoT - 05.07.2013, 13:10
Re: /assaltar - by Knight97 - 05.07.2013, 13:22
Re: /assaltar - by Coe1 - 05.07.2013, 13:23
Re: /assaltar - by godkrad - 05.07.2013, 13:27
Respuesta: /assaltar - by viniciuship - 05.07.2013, 14:36

Forum Jump:


Users browsing this thread: 3 Guest(s)