22.12.2013, 08:54
On top
Made it with zcmd
now go OnDialogResponse public
For the toys, I couldn't make it cauz it will take alot of time and it will require big system and etc so didn't make it
pawn Код:
#define DIALOG_VIPGUNS 5000
//idk if you have more dialogs, so I just put 5000
pawn Код:
CMD:getviparmor(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"You must be in a vehicle to use this command.");
SetPlayerArmour(playerid,100);
SendClientMessage(playerid,-1,"You have successfully refilled your armour.");
return 1;
}
pawn Код:
CMD:getvipgun(playerid,params[])
{
SendClientMessage(playerid,-1,"Please select the gun you'd like to spawn.");
ShowPlayerDialog(playerid,DIALOG_VIPGUNS,DIALOG_STYLE_LIST,"VIP Guns List","Desert Eagle\nSawn-Off shotgun\nCombat Shotgun\nNormal Shotgun\nMinigun","Select","Close"); //I made few guns, not all, you can add few more if you want.
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_VIPGUNS)
{
if(response) // If they clicked 'Yes' or pressed enter
{
if(listitem == 0) //Desert Eagle
{
GivePlayerWeapon(playerid,24,100);
}
if(listitem == 1) //Sawn-Off shotgun
{
GivePlayerWeapon(playerid,26,100);
}
if(listitem == 2) //Combat Shotgun
{
GivePlayerWeapon(playerid,27,100);
}
if(listitem == 3) //Normal Shotgun
{
GivePlayerWeapon(playerid,25,100);
}
if(listitem == 4) //Minigun
{
GivePlayerWeapon(playerid,38,100);
}
}
return 1;
}
return 0;
}