05.09.2013, 22:22
pawn Код:
if(dialogid == DIALOG_CLICK) // this line coming up as the error
{
if(!response) return SCM(playerid,-1,"Dialog is closed");
new
text[128];
switch(listitem)
{
case 0:
{
Kick(GetPVarInt(playerid,"pplayerid"));
SetPVarInt(playerid,"pplayerid",999);
format(text,sizeof(text),"Admin %s is kick you from server!",GetName(playerid));
SCM(GetPVarInt(playerid,"pplayerid"),-1,text);
}
case 1:
{
Ban(GetPVarInt(playerid,"pplayerid"));
SetPVarInt(playerid,"pplayerid",999);
format(text,sizeof(text),"Admin %s is ban you from server!",GetName(playerid));
SCM(GetPVarInt(playerid,"pplayerid"),-1,text);
}
case 2:
{
ShowPlayerDialog(playerid,DIALOG_ADMIN,DIALOG_STYLE_INPUT,"Admin Control Panel","Type admin level [1-5]","Make","Лxit");
}
}
}
Or put case DIALOG_CLICK in a switch.