[Ajuda] Evento x1
#1

#Resolvido
Reply
#2

Mande a dialog EventoC
Reply
#3

Tinha Mandando o Cуdigo Errado, /\
Reply
#4

Manda as cordenadas do evento x1 ae
Reply
#5

pawn Код:
-2325.8257,-1637.0542,483.7031
Reply
#6

Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
    if(!strcmp("/eventox1", cmdtext, true)) {
        if(PlayerInfo[playerid][pAdmin] >= 4) {
            if(!eventoIniciado) {
                new name[24];
                GetPlayerName(playerid, name, sizeof(name));
                format(buffer, sizeof(buffer), "{FFFFFF}O admin rcon %s criou um evento x1, deseja comparecer?", name);
                for(new i = GetMaxPlayers() - 1; i > -1; --i) {
                    ShowPlayerDialog(i, DIALOG_EVENTOX1, DIALOG_STYLE_MSGBOX, "x1", buffer, "Sim", "Nгo");
                }
                eventoIniciado = true;
            }
        }
        return 1;
    }
    if(!strcmp("/finalizarevento", cmdtext, true)) {
        if(IsPlayerAdmin(playerid)) {
            if(eventoIniciado) {
                for(new i = GetMaxPlayers() - 1; i > -1; --i) {
                    SpawnPlayer(i);
                }
                eventoIniciado = false;
            }
        }
    }
    return 0;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if(DIALOG_EVENTOX1 == dialogid) {
        eventoX1[playerid] = true;

        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerInterior(playerid, 10); // troque de acordo com seus interesses
        SetPlayerPos(playerid, 0.0, 0.0, 0.0); // troque de acordo com seus interesses
        GivePlayerWeapon(playerid, 24, 99999);
        SetPlayerPos(playerid,-2325.8257,-1637.0542,483.7031);
    }
    return 1;
}
Espero ter ajudado
Reply
#7

Pawn Parou de Funcionar,
Tem Algo Errado -'
Reply
#8

Код:
    if(!strcmp("/eventox1", cmdtext, true))
	{
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
			{
                if(!eventoIniciado)
				{
                new name[24];
                GetPlayerName(playerid, name, sizeof(name));
                format(buffer, sizeof(buffer), "{FFFFFF}O admin rcon %s criou um evento x1, deseja comparecer?", name);
                for(new i = GetMaxPlayers() - 1; i > -1; --i) {
                ShowPlayerDialog(i, DIALOG_EVENTOX1, DIALOG_STYLE_MSGBOX, "x1", buffer, "Sim", "Nгo");
                }
                eventoIniciado = true;
            }
        }
        return 1;
    }
Tenta ae
Reply
#9

FAIL ainda,
Eu Tirei o Cуdigo lб do OnDialogResponse
Ai deu uns erros

Axo que o erro й no OnDialogResponse

quando eu tirei e coloquei o seu Novo Cуdigo /\
deu esse erro:

pawn Код:
C:\Users\Admin\Desktop\TESTE\gamemodes\new.pwn(22553) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\TESTE\gamemodes\new.pwn(24868) : warning 202: number of arguments does not match definition
CC:\Users\Admin\Desktop\TESTE\gamemodes\new.pwn(37871) : error 017: undefined symbol "eventoIniciado"
C:\Users\Admin\Desktop\TESTE\gamemodes\new.pwnn(37875) : error 017: undefined symbol "buffer"
C:\Users\Admin\Desktop\TESTE\gamemodes\new.pwn(37875) : error 017: undefined symbol "buffer"
C:\Users\Admin\Desktop\TESTE\gamemodes\new.pwn(37875) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\TESTE\gamemodes\new.pwn(37875) : fatal error 107: too many error messages on one line
Reply
#10

Код:
    if(!strcmp("/eventox1", cmdtext, true))
	{
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
			{
                if(!eventoIniciado)
				{
                new name[24];
                GetPlayerName(playerid, name, sizeof(name));
                format(buffer, sizeof(buffer), "{FFFFFF}O admin rcon %s criou um evento x1, deseja comparecer?", name);
                for(new i = GetMaxPlayers() - 1; i > -1; --i) {
                ShowPlayerDialog(i, DIALOG_EVENTOX1, DIALOG_STYLE_MSGBOX, "x1", buffer, "Sim", "Nгo");
                }
                eventoIniciado = true;
                }
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)