[AJUDA] Como criar comando /assaltar?
#3

Bem simples. pegue como base!
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(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;
}
Reply


Messages In This Thread
[AJUDA] Como criar comando /assaltar? - by diihtmartins - 23.02.2012, 17:46
Re: [AJUDA] Como criar comando /assaltar? - by Troll Face - 23.02.2012, 17:55
Re: [AJUDA] Como criar comando /assaltar? - by paulor - 23.02.2012, 18:05
Re: [AJUDA] Como criar comando /assaltar? - by diihtmartins - 23.02.2012, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)