26.12.2010, 19:25
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/faseratentado ", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,666,DIALOG_STYLE_LIST,"Menu Atentado","DP \n Aero \n Predio","OK","Fechar");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 666){
if(response){
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(listitem == 0){
new string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s e AsFarc irгo atacar a DP", name);
SendClientMessageToAll(0xFF0000AA, string);
}
if(listitem == 1){
new string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s e AsFarc irгo atacar o Aero", name);
SendClientMessageToAll(0xFF0000AA, string);
}
if(listitem == 2){
new string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s e AsFarc irгo atacar o Predio", name);
SendClientMessageToAll(0xFF0000AA, string);
}
}
else{
}
}
return 1;
}
se tiver algo errado avisa ae fiz rapidгo