13.09.2012, 06:01
pawn Код:
#include <a_samp>
new Gender[MAX_PLAYERS]; //1 - male | 2 - female
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Gender","Male/nFemale","Select","");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
Gender[playerid] = 1;
SendClientMessage(playerid,-1,"You are a male.");
}
if(listitem == 1)
{
Gender[playerid] = 2;
SendClientMessage(playerid,-1,"You are a female.");
}
}
return 1;
}
return 0;
}