pawn Код:
#include <a_samp>
#include <zcmd>
#define DIALOG_WEAPONS 3
#define red 0xFF0000AA
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" WeaponDialog By ThePrograme ");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" WeaponDialog By ThePrograme ");
print("----------------------------------\n");
}
#endif
CMD:weapons(playerid, params[])
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,red,"You have to be an admin to use this command");
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons","Chainsaw\nGrenade\nTear Gas\nMolotov Cocktail\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nUZI\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle\nRPG\nHS Rocket\nFlamethrower\nMinigun\nSatchel Charge\nDetonator\nParachute\nJetpack\nHealth\nArmour","Select","Close");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_WEAPONS)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, WEAPON_CHAINSAW, 1);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, WEAPON_GRENADE, 99999);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, WEAPON_TEARGAS, 99999);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, WEAPON_MOLTOV, 99999);
}
if(listitem == 4)
{
GivePlayerWeapon(playerid, WEAPON_COLT45, 99999);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, WEAPON_SILENCED, 99999);
}
if(listitem == 6)
{
GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999);
}
if(listitem == 7)
{
GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 99999);
}
if(listitem == 8)
{
GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 99999);
}
if(listitem == 9)
{
GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 99999);
}
if(listitem == 10)
{
GivePlayerWeapon(playerid, WEAPON_UZI, 99999);
}
if(listitem == 11)
{
GivePlayerWeapon(playerid, WEAPON_MP5, 99999);
}
if(listitem == 12)
{
GivePlayerWeapon(playerid, WEAPON_AK47, 99999);
}
if(listitem == 13)
{
GivePlayerWeapon(playerid, WEAPON_M4, 99999);
}
if(listitem == 14)
{
GivePlayerWeapon(playerid, WEAPON_TEC9, 99999);
}
if(listitem == 15)
{
GivePlayerWeapon(playerid, WEAPON_RIFLE, 99999);
}
if(listitem == 16)
{
GivePlayerWeapon(playerid, WEAPON_SNIPER, 99999);
}
if(listitem == 17)
{
GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 99999);
}
if(listitem == 18)
{
GivePlayerWeapon(playerid, WEAPON_HEATSEEKER, 99999);
}
if(listitem == 19)
{
GivePlayerWeapon(playerid, WEAPON_FLAMETHROWER, 99999);
}
if(listitem == 20)
{
GivePlayerWeapon(playerid, WEAPON_MINIGUN, 99999);
}
if(listitem == 21)
{
GivePlayerWeapon(playerid, WEAPON_SATCHEL, 99999);
}
if(listitem == 22)
{
GivePlayerWeapon(playerid, WEAPON_BOMB, 1);
}
if(listitem == 23)
{
GivePlayerWeapon(playerid, WEAPON_PARACHUTE, 1);
}
if(listitem == 24)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
}
if(listitem == 25)
{
SetPlayerHealth(playerid, 100.0);
}
if(listitem == 26)
{
SetPlayerArmour(playerid, 100.0);
}
}
return 1;
}
return 0;
}