[AJUDA] Evento ! Zumbie x Mendingos !
#3

Faзa o resto ai '-' te dei a faca e o queijo
pawn Код:
#include             <a_samp>
#define ZxM          5432
new InZxM[MAX_PLAYERS];

public OnFilterScriptInit(){return 1;}
public OnFilterScriptExit(){return 1;}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == ZxM)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    InZxM[playerid] = 1;
                    GivePlayerWeapon(playerid, 29, 900);
                    GivePlayerWeapon(playerid, 24, 900);
                    GivePlayerWeapon(playerid, 31, 900);
                    SetPlayerPos(playerid, 0,0,0);
                }
                case 1:
                {
                    InZxM[playerid] = 1;
                    GivePlayerWeapon(playerid, 26, 900);
                    GivePlayerWeapon(playerid, 24, 900);
                    GivePlayerWeapon(playerid, 32, 900);
                    SetPlayerPos(playerid, 0,0,0);
                }
            }
        }
    }
    return 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(InZxM[playerid] == 1)
    {
        new string[100];
        format(string, sizeof(string),"[EVENTO] %s Matou %s No evento e Ganhou 1000 de Bonus !.",nome(killerid), nome(playerid));
        SendClientMessageToAll(-1, string);
        GivePlayerMoney(killerid, 1000);
        InZxM[playerid] = 0;
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(InZxM[playerid] == 1) return SendClientMessage(playerid, -1, " Vocк estб em um evento e nгo pode usar comandos!");
    if (strcmp("/eventozxm", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,ZxM,DIALOG_STYLE_LIST,"Escolha Qual Time vocк quer !","Zumbie\nMendingos","Selecionar","Cancelar");
        return 1;
    }
    return 0;
}

stock nome(playerid)
{
    new nj[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nj, sizeof(nj));
    return nj;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)