tipo queria quando o admin chama para o evento. de vez o player digita: sim ou nгo.
pawn Код:
if(strcmp(cmd, "/eventokart", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TrazerKart[i] = 1;
SendClientMessage(i ,COLOR_LIGHTBLUE, "Admin estб chamando todos para um Evento Corrida Maluca!");
SendClientMessage(i ,COLOR_LIGHTBLUE, "Digite 'Sim' para ir e 'Nao' para continuar onde estб.");
OnTrazerKart = 1;
}
}
if(TrazerKart[playerid] == 1)
{
SetPlayerPos(playerid,-2415.3999,2219.0083,4.9844);
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /eventokart!");
TrazerKart[playerid] = 0;
Limite26 = 0;
return 1;
}
if(OnTrazerKart == 1 || OnTrazer == 1 || OnTrazerRally == 1 || OnTrazerX1 == 1)
{
SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /eventokart, use /destruirkart para criar outro!");
return 1;
}
return 1;
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/destruirkart", true) == 0 || strcmp(cmd, "/dkart", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(OnTrazerKart == 1 && IsPlayerConnected(i))
{
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк destruiu o /eventokart!");
TrazerKart[i] = 0;
OnTrazerKart = 0;
Limite26 = 0;
return 1;
}
}
}
}
// ---------------------------------[Evento Rally]
if(strcmp(cmd, "/eventorally", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
GetPlayerPos(playerid, trazerx, trazery, trazerz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TrazerRally[i] = 1;
SendClientMessage(i ,COLOR_LIGHTBLUE, "Admin estб chamando todos para um Evento De Rally!");
SendClientMessage(i ,COLOR_LIGHTBLUE, "Digite 'Sim' para ir ou 'Nao' para continuar onde estб.");
OnTrazerRally = 1;
}
}
if(TrazerRally[playerid] == 1)
{
SetPlayerPos(playerid, -2390.8176,-2203.0850,33.2891);
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /eventorally!");
TrazerRally[playerid] = 0;
Limite22 = 0;
return 1;
}
if(OnTrazerKart == 1 || OnTrazer == 1 || OnTrazerRally == 1 || OnTrazerX1 == 1)
{
SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /eventokart ou /trazertodos,use /DestruirKart ou /destruirtrazer para criar outro!");
return 1;
}
return 1;
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/destruirrally", true) == 0 || strcmp(cmd, "/dr", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(OnTrazerKart == 1 && IsPlayerConnected(i))
{
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк destruiu o /eventorally!");
TrazerRally[i] = 0;
OnTrazerRally = 0;
Limite22 = 0;
return 1;
}
}
}
}
//----------------------------------[Trazer TODOS]
if(strcmp(cmd, "/trazertodos", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
GetPlayerPos(playerid, trazerx, trazery, trazerz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TrazerTodos[i] = 1;
SendClientMessage(i ,COLOR_LIGHTBLUE, "Admin estб chamando todos para um evento!");
SendClientMessage(i ,COLOR_LIGHTBLUE, "Digite 'Sim' para ir e 'Nao' para continuar onde estб.");
OnTrazer = 1;
}
}
if(TrazerTodos[playerid] == 1)
{
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /trazertodos!");
TrazerTodos[playerid] = 0;
return 1;
}
if(OnTrazer == 1)
{
SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /trazertodos,use /destruirtrazer para criar outro!");
return 1;
}
return 1;
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/destruirtrazer", true) == 0 || strcmp(cmd, "/dt", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(OnTrazer == 1 && IsPlayerConnected(i))
{
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк destruiu o /trazertodos!");
TrazerTodos[i] = 0;
OnTrazer = 0;
return 1;
}
}
}
}
//----------------------------------[Trazer TODOS]
if(strcmp(cmd, "/trazertodosx1", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
GetPlayerPos(playerid, trazerx, trazery, trazerz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TrazerTodosX1[i] = 1;
SendClientMessage(i ,COLOR_LIGHTBLUE, "Admin estб chamando todos para um evento de X1!");
SendClientMessage(i ,COLOR_LIGHTBLUE, "Digite 'Sim' para ir e 'Nao' para continuar onde estб.");
OnTrazerX1 = 1;
}
}
if(TrazerTodosX1[playerid] == 1)
{
SetPlayerPos(playerid,-2326.8809,-1636.9822,483.7031);
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк ativou o /trazertodosx1!");
TrazerTodosX1[playerid] = 0;
return 1;
}
if(OnTrazerX1 == 1)
{
SendClientMessage(playerid ,COLOR_GREY, "Ja estгo usando /trazertodos,use /destruirtrazer para criar outro!");
return 1;
}
return 1;
}
return 1;
}
return 1;
}
if(strcmp(cmd, "/destruirtrazerx1", true) == 0 || strcmp(cmd, "/dtx1", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 3)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(OnTrazerX1 == 1 && IsPlayerConnected(i))
{
SendClientMessage(playerid ,COLOR_LIGHTRED, "Vocк destruiu o /trazertodos!");
TrazerTodosX1[i] = 0;
OnTrazerX1 = 0;
return 1;
}
}
}
}
pawn Код:
//Junto as Defines
#define EVENTOC 3423
//OnDialogResponse
if(dialogid == EVENTOC){if(response == 0){SendClientMessage(playerid, COLOR_DBLUE, "Ok, vocк nгo quis ir ao evento.");return true;}
if(response >= 1){if(PlayerInfo[playerid][pJailed] >= 1){SendClientMessage(playerid, COLOR_GREY, "Vocк estб preso e por isso nгo poderб comparecer ao evento.");return true;}
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Obrigado por comparecer a este evento.");
SetPlayerPos(playerid,ex,ey,ez);
return true;}return true;}
//OnPlayerCommandText
if(strcmp(cmd, "/criarevento", true) == 0){if(IsPlayerConnected(playerid)){
if(PlayerInfo[playerid][pAdmin] >= 4){if(Evento == 1){SendClientMessage(playerid, COLOR_WHITE, "Jб estб decorrendo um evento use, /pararevento para abrir outro!");return true;}if(Evento == 0){
SendClientMessage(playerid, COLOR_WHITE, "Vocк estб criando um evento e chamando todos do BMC.");
for(new i = 0; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i)){
Evento = 1;GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Administraзгo: %s estб chamando todos para um Evento.\nPara ir ao evento clique em 'SIM'.\nPara nгo ir clique em 'NГO'.",sendername);
ShowPlayerDialog(i, EVENTOC, DIALOG_STYLE_MSGBOX, "EVENTO INICIADO", string, "Sim", "Nгo");
GetPlayerPos(playerid,ex,ey,ez);}}}}return true;}}