pawn Код:
//==============================================================================
#include <a_samp>
#include <dcmd>
//==============================================================================
new wmenu, fsmenu, str[128];
//==============================================================================
#define COLOR_RED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
//==============================================================================
public OnFilterScriptInit()
{
return 0;
}
public OnFilterScriptExit()
{
return 0;
}
//==============================================================================
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(wmenu, 8, cmdtext);
dcmd(fsmenu, 9, cmdtext);
return 0;
}
//==============================================================================
dcmd_wmenu(playerid, params[])
{
#pragma unused params
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
return 1;
}
dcmd_fsmenu(playerid, params[])
{
#pragma unused params
ShowPlayerDialog(playerid, fsmenu, DIALOG_STYLE_LIST, "Choose You Fighting Style","Normal\nBoxing\nKung Fu\nKneehead\nGrab Kick\nElbow", "Select", "Cancel");
return 1;
}
//==============================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == wmenu)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, wmenu+1, DIALOG_STYLE_LIST, "Pistols", "9MM\nSilanced 9MM\nDesert Eagle\nBack", "Buy", "Cancel");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, wmenu+2, DIALOG_STYLE_LIST, "Micro SMGs", "Micro SMG\nTec 9\nMP5\nBack", "Buy", "Cancel");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, wmenu+3, DIALOG_STYLE_LIST, "Shotguns", "Shotgun\nSawnoff Shotgun\nCombat Shotgun\nBack", "Buy", "Cancel");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, wmenu+4, DIALOG_STYLE_LIST, "Others", "Armour\nParachute\nCamera\nBack", "Buy", "Cancel");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, wmenu+5, DIALOG_STYLE_LIST, "Assault", "AK-47\nM4\nBack", "Buy", "Cancel");
}
if(listitem == 5)
{
ShowPlayerDialog(playerid, wmenu+6, DIALOG_STYLE_LIST, "Dengerous Weapons", "Rocket Launcher\nHeat Seeker\nFlame Thrower\nMinigun\nBack", "Buy", "Cancel");
}
if(listitem == 6)
{
ShowPlayerDialog(playerid, wmenu+7, DIALOG_STYLE_LIST, "******s", "Night Vision ******\nThermal Vision ******\nBack", "Buy", "Cancel");
}
if(listitem == 7)
{
ShowPlayerDialog(playerid, wmenu+8, DIALOG_STYLE_LIST, "Snipers", "Rifle\nSniper Rifle\nBack", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+1)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -200);
GivePlayerWeapon(playerid, 22, 99999);
return 1;
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -200);
GivePlayerWeapon(playerid, 23, 99999);
return 1;
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -200);
GivePlayerWeapon(playerid, 24, 99999);
return 1;
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
}
}
if(dialogid == wmenu+2)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -340);
GivePlayerWeapon(playerid, 28, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Micro SMG.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -340);
GivePlayerWeapon(playerid, 32, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Tec 9.");
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -450);
GivePlayerWeapon(playerid, 29, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy MP5.");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+3)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 25, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Shotgun.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -340);
GivePlayerWeapon(playerid, 26, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Sawnoff Shotgun.");
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -470);
GivePlayerWeapon(playerid, 27, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Combat Shotgun.");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+4)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy an Armour.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 43, 1);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy a Parachute.");
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 43, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy a Camera.");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+5)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -1500);
GivePlayerWeapon(playerid, 30, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy AK-47.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -2200);
GivePlayerWeapon(playerid, 31, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy M4.");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+6)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -10000);
GivePlayerWeapon(playerid, 35, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Rocket Launcher.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -10000);
GivePlayerWeapon(playerid, 36, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Heat Seeker.");
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -5000);
GivePlayerWeapon(playerid, 37, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Flame Thrower.");
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 4) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -100000);
GivePlayerWeapon(playerid, 38, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Minigun.");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+7)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GivePlayerWeapon(playerid, 44, 1);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Night Vision ******.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GivePlayerWeapon(playerid, 45, 1);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Thermal Vision ******.");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == wmenu+8)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 33, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Rifle.");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough cash.");
GivePlayerMoney(playerid, -250);
GivePlayerWeapon(playerid, 34, 99999);
SendClientMessage(playerid, COLOR_GREEN, "You have sucessfully buy Sniper Rifle.");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, wmenu, DIALOG_STYLE_LIST, "Weapon Shop Menu","Pistols\nMicro SMGs\nShotguns\nOthers\nAssault\nDengerous Weapons\n******s\nSniper", "Buy", "Cancel");
}
return 1;
}
}
if(dialogid == fsmenu)
{
if(response)
{
if(listitem == 0)
{
format(str, sizeof(str), "You have successfuly changed your fighting style to Normal");
SendClientMessage(playerid, COLOR_YELLOW, str);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
}
if(listitem == 1)
{
format(str, sizeof(str), "You have successfuly changed your fighting style to Boxing");
SendClientMessage(playerid, COLOR_YELLOW, str);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
}
if(listitem == 2)
{
format(str, sizeof(str), "You have successfuly changed your fighting style to Kung Fu");
SendClientMessage(playerid, COLOR_YELLOW, str);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
}
if(listitem == 3)
{
format(str, sizeof(str), "You have successfuly changed your fighting style to Kneehead");
SendClientMessage(playerid, COLOR_YELLOW, str);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
}
if(listitem == 4)
{
format(str, sizeof(str), "You have successfuly changed your fighting style to Grab Kick");
SendClientMessage(playerid, COLOR_YELLOW, str);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
}
if(listitem == 5)
{
format(str, sizeof(str), "You have successfuly changed your fighting style to Elbow");
SendClientMessage(playerid, COLOR_YELLOW, str);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
}
}
}
return 1;
}
//==============================================================================