22.07.2011, 13:30
pawn Код:
CMD:vipgunsmenu(playerid, params[])
{
if(IsPlayerVip[playerid] >= 1)
{
ShowPlayerDialog(playerid, vipguns, DIALOG_STYLE_LIST, "Vip Guns", "Shawn-off\nTec9", "Accept", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000, "You can not use this command. Reason: You are not VIP player.");
return 1;
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(vipguns)
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
GivePlayerWeapon(playerid, 36, 500);
}
case 1:
{
GivePlayerWeapon(playerid, 26, 500);
}
}
}
}
return 1;
}
Thanks.