05.04.2014, 11:46
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_EVENTO)
{
if(response)
{
ShowPlayerDialog(playerid, DIALOG_CORRIDA, DIALOG_STYLE_MSGBOX, "{CD3333}Evento", "Qual tipo de corrida deseja realizar?", "Normal", "Checkpoint");
return 1;
}
if(!response)
{
ToEvento[playerid] = true;
EventoFechado = 0;
TotalPlayers++;
TipoEvento = 1;
EventoFechado = 0;
GetPlayerPos(playerid, evx, evy, evz);
format(estr, 128, "[CVoEventos] Evento criado com sucesso. [Vagas: %d]", TotalVagas);
SendClientMessage(playerid, COR_CORRECAO, estr);
format(estr, 128, "~b~~h~~h~Comandos: ~w~Off");
PlayerTextDrawSetString(playerid, evento1, estr);
format(estr, 128, "~b~~h~~h~Checkpoints: ~w~0");
PlayerTextDrawSetString(playerid, evento2, estr);
format(estr, 128, "~b~~h~~h~Vagas: ~w~%d/%d", TotalPlayers, TotalVagas);
PlayerTextDrawSetString(playerid, evento3, estr);
format(estr, 128, "~b~~h~~h~Tipo: ~w~Apй");
PlayerTextDrawSetString(playerid, evento4, estr);
format(estr, 128, "~b~~h~~h~Status: ~w~Aberto");
PlayerTextDrawSetString(playerid, evento5, estr);
PlayerTextDrawShow(playerid, evento1);
PlayerTextDrawShow(playerid, evento2);
PlayerTextDrawShow(playerid, evento3);
PlayerTextDrawShow(playerid, evento4);
PlayerTextDrawShow(playerid, evento5);
return 1;
}
}
return 1;
}
CMD:irevento(playerid, params[])
{
SetPlayerPos(playerid, evx, evy, evz);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, -1, "Vocк estб no evento, use /sairevento quando quiser sair!");
GameTextForPlayer(playerid, "~r~Use ~y~/sairevento ~r~para sair !", 5000, 3);
return 1;
}
CMD:criarevento(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_EVENTO, DIALOG_STYLE_MSGBOX, "{CD3333}Evento", "Qual tipo de evento deseja criar?", "Corrida", "Apй");
return 1;
}