Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*
- Ìíîãî åù¸ ïðàâèòü öåí è òåêñòà
- by O.K.Style
- */
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GOLD 0xFF9900AA
- #define COLOR_RED 0xFF0000FF
- new Menu:Cars,Menu:Sport, Menu:Bikes, Menu:gc, Menu:Racing;
- new Menu:weapons,Menu:melee,Menu:pistols,Menu:shotguns,Menu:smg,Menu:assault,Menu:rifles,Menu:thrown;
- new Float:x, Float:y, Float:z, Float:at;
- public OnFilterScriptInit()
- {
- gc = CreateMenu("~y~Cars & Guns~p~", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(gc, 0, "Cars");
- AddMenuItem(gc, 0, "weapons");
- weapons = CreateMenu("~r~weapons", 1, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(weapons, 0, "melee");
- AddMenuItem(weapons, 0, "pistols");
- AddMenuItem(weapons, 0, "shotguns");
- AddMenuItem(weapons, 0, "smg");
- AddMenuItem(weapons, 0, "assault");
- AddMenuItem(weapons, 0, "rifles");
- AddMenuItem(weapons, 0, "thrown");
- melee = CreateMenu("~b~melee", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(melee, 0, "bat");
- AddMenuItem(melee, 1, "$100");
- AddMenuItem(melee, 0, "spade");
- AddMenuItem(melee, 1, "$100");
- AddMenuItem(melee, 0, "golfclub");
- AddMenuItem(melee, 1, "$100");
- AddMenuItem(melee, 0, "katana");
- AddMenuItem(melee, 1, "$200");
- AddMenuItem(melee, 0, "knife");
- AddMenuItem(melee, 1, "$200");
- AddMenuItem(melee, 0, "pool cue");
- AddMenuItem(melee, 1, "$50");
- AddMenuItem(melee, 0, "chainsaw");
- AddMenuItem(melee, 1, "$200");
- pistols = CreateMenu("~b~pistols", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(pistols, 0, "pistol");
- AddMenuItem(pistols, 1, "$250");
- AddMenuItem(pistols, 0, "deagle");
- AddMenuItem(pistols, 1, "$300");
- AddMenuItem(pistols, 0, "spistol");
- AddMenuItem(pistols, 1, "$300");
- shotguns = CreateMenu("~g~shotguns", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(shotguns, 0, "sawnoff");
- AddMenuItem(shotguns, 1, "$500");
- AddMenuItem(shotguns, 0, "combat");
- AddMenuItem(shotguns, 1, "$500");
- smg = CreateMenu("~g~smg", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(smg, 0, "mac 10");
- AddMenuItem(smg, 1, "$600");
- AddMenuItem(smg, 0, "tec 9");
- AddMenuItem(smg, 1, "$600");
- AddMenuItem(smg, 0, "mp 5");
- AddMenuItem(smg, 1, "$700");
- assault = CreateMenu("~y~assault", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(assault, 0, "m4");
- AddMenuItem(assault, 1, "$1000");
- AddMenuItem(assault, 0, "ak 47");
- AddMenuItem(assault, 1, "$800");
- rifles = CreateMenu("~y~rifles", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(rifles, 0, "snaipe");
- AddMenuItem(rifles, 1, "$400");
- AddMenuItem(rifles, 0, "prosnipe");
- AddMenuItem(rifles, 1, "$700");
- thrown = CreateMenu("~p~throwm", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(thrown, 0, "greneade");
- AddMenuItem(thrown, 1, "$500");
- AddMenuItem(thrown, 0, "molotov");
- AddMenuItem(thrown, 1, "$250");
- AddMenuItem(thrown, 0, "satchel charges");
- AddMenuItem(thrown, 1, "$1000");
- Cars = CreateMenu("~r~Cars", 1, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(Cars, 0, "Sport");
- AddMenuItem(Cars, 0, "Bikes");
- AddMenuItem(Cars, 0, "Racing");
- Sport = CreateMenu("~b~Sport", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(Sport, 0, "Turismo");
- AddMenuItem(Sport, 1, "$1000");
- AddMenuItem(Sport, 0, "Infernus");
- AddMenuItem(Sport, 1, "$1000");
- AddMenuItem(Sport, 0, "Bullet");
- AddMenuItem(Sport, 1, "$1000");
- AddMenuItem(Sport, 0, "Comet");
- AddMenuItem(Sport, 1, "$1000");
- AddMenuItem(Sport, 0, "Buffalo");
- AddMenuItem(Sport, 1, "$1000");
- AddMenuItem(Sport, 0, "Banshee");
- AddMenuItem(Sport, 1, "$1000");
- Bikes = CreateMenu("~b~Bikes", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(Bikes, 0, "Faggio");
- AddMenuItem(Bikes, 1, "$1000");
- AddMenuItem(Bikes, 0, "fcr900");
- AddMenuItem(Bikes, 1, "$1000");
- AddMenuItem(Bikes, 0, "pcj600");
- AddMenuItem(Bikes, 1, "$1000");
- AddMenuItem(Bikes, 0, "sanchez");
- AddMenuItem(Bikes, 1, "$1000");
- AddMenuItem(Bikes, 0, "freeway");
- AddMenuItem(Bikes, 1, "$1000");
- Racing = CreateMenu("~g~Racing", 2, 50.0, 180.0, 200.0, 200.0);
- AddMenuItem(Racing, 0, "Hotring Racer");
- AddMenuItem(Racing, 1, "$1000");
- AddMenuItem(Racing, 0, "Bloodring Banger");
- AddMenuItem(Racing, 1, "$1000");
- AddMenuItem(Racing, 0, "Super GT");
- AddMenuItem(Racing, 1, "$1000");
- AddMenuItem(Racing, 0, "Sultan");
- AddMenuItem(Racing, 1, "$1000");
- AddMenuItem(Racing, 0, "Elegy");
- AddMenuItem(Racing, 1, "$1000");
- AddMenuItem(Racing, 0, "Flash");
- AddMenuItem(Racing, 1, "$1000");
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- HideMenuForPlayer(gc,i);
- HideMenuForPlayer(weapons,i);
- HideMenuForPlayer(melee,i);
- HideMenuForPlayer(pistols,i);
- HideMenuForPlayer(shotguns,i);
- HideMenuForPlayer(smg,i);
- HideMenuForPlayer(assault,i);
- HideMenuForPlayer(rifles,i);
- HideMenuForPlayer(thrown,i);
- HideMenuForPlayer(Cars,i);
- HideMenuForPlayer(Sport,i);
- HideMenuForPlayer(Bikes,i);
- HideMenuForPlayer(Racing,i);
- if(TogglePlayerControllable(i,0) TogglePlayerControllable(i,1);
- }
- DestroyMenu(gc);
- DestroyMenu(weapons);
- DestroyMenu(melee);
- DestroyMenu(pistols);
- DestroyMenu(shotguns);
- DestroyMenu(smg);
- DestroyMenu(assault);
- DestroyMenu(rifles);
- DestroyMenu(thrown);
- DestroyMenu(Cars);
- DestroyMenu(Sport);
- DestroyMenu(Bikes);
- DestroyMenu(Racing);
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid,row)
- {
- if(GetPlayerMenu(playerid) == gc)
- {
- switch(row)
- {
- case 0: ShowMenuForPlayer(Menu:Cars, playerid);
- case 1: ShowMenuForPlayer(Menu:weapons, playerid);
- }
- }
- else if(GetPlayerMenu(playerid) == weapons)
- {
- switch(row)
- {
- case 0: ShowMenuForPlayer(Menu:melee,playerid);
- case 1: ShowMenuForPlayer(Menu:pistols,playerid);
- case 2: ShowMenuForPlayer(Menu:shotguns,playerid);
- case 3: ShowMenuForPlayer(Menu:smg,playerid);
- case 4: ShowMenuForPlayer(Menu:assault,playerid);
- case 5: ShowMenuForPlayer(Menu:rifles,playerid);
- case 6: ShowMenuForPlayer(Menu:thrown,playerid);
- }
- }
- else if(GetPlayerMenu(playerid) == Cars)
- {
- switch(row)
- {
- case 0: ShowMenuForPlayer(Menu:Sport, playerid);
- case 1: ShowMenuForPlayer(Menu:Bikes, playerid);
- case 2: ShowMenuForPlayer(Menu:Racing, playerid);
- }
- }
- else if(GetPlayerMenu(playerid) == Sport)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=1001)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(451,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Turismo");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(411,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Infernus");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=100)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(541,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Bullet");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 3:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(480,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Comet");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Íåäîñòàòî÷íî äåíåã");
- }
- case 4:
- {
- if(GetPlayerMoney(playerid)>=200)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(402,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Buffalo");
- }
- else SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 5:
- {
- if(GetPlayerMoney(playerid)>=50)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(429,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid, COLOR_GOLD, "Âû êóïèëè Banshee Banger");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == Bikes)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(462,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Faggio");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(521,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè FCR 900");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(461,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè PCJ-600");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 3:
- {
- if(GetPlayerMoney(playerid)>=300)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(468,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid, COLOR_GOLD,"Âû êóïèëè Sanchez");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 4:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(463,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Freeway");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == Racing)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=100)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(494,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Hotring Racer");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(504,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Bloodring Banger");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(506,x+1,y+1,z,at,0,0,100);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Super GT");
- }
- else SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 3:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(560,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Sultan");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- case 4:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33AA33AA,"Âûéäè èç òðàíñïîðòà");
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,at);
- CreateVehicle(562,x+1,y+1,z,at,0,0,10000);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid,COLOR_GOLD,"Âû êóïèëè Elegy");
- }
- else return SendClientMessage(playerid,COLOR_RED,"Íåäîñòàòî÷íî äåíåã");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == melee)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=100)
- {
- GivePlayerWeapon(playerid,5,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a bat");
- GivePlayerMoney(playerid,-100);
- }
- else return SendClientMessage(playerid,COLOR_RED,"You need $100 for this bat");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=100)
- {
- GivePlayerWeapon(playerid,6,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a spade");
- GivePlayerMoney(playerid,-100);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $100 for this spade");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=100)
- {
- GivePlayerWeapon(playerid,2,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a golfclub");
- GivePlayerMoney(playerid,-100);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $100 for this golfclub");
- }
- case 3:
- {
- if(GetPlayerMoney(playerid)>=200)
- {
- GivePlayerWeapon(playerid,8,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a katana");
- GivePlayerMoney(playerid,-200);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $200 for this sword");
- }
- case 4:
- {
- if(GetPlayerMoney(playerid)>=200)
- {
- GivePlayerWeapon(playerid,4,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a knife");
- GivePlayerMoney(playerid,-200);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $200 for this knife");
- }
- case 5:
- {
- if(GetPlayerMoney(playerid)>=50)
- {
- GivePlayerWeapon(playerid,7,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a pool cue");
- GivePlayerMoney(playerid,-50);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $50 for this cue");
- }
- case 6:
- {
- if(GetPlayerMoney(playerid)>=200)
- {
- GivePlayerWeapon(playerid,9,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a chainsaw");
- GivePlayerMoney(playerid,-200);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $200 for this chainsaw");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == pistols)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=250)
- {
- GivePlayerWeapon(playerid,22,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a pistol");
- GivePlayerMoney(playerid,-250);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $250 for this pistol");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=300)
- {
- GivePlayerWeapon(playerid,24,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a pistol");
- GivePlayerMoney(playerid,-300);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $300 for this pistol");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=300)
- {
- GivePlayerWeapon(playerid,23,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a silenced pistol");
- GivePlayerMoney(playerid,-300);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $300 for this pistol");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == shotguns)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=500)
- {
- GivePlayerWeapon(playerid,26,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a sawnoff shotgun");
- GivePlayerMoney(playerid,-500);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $500 for this shotgun");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=500)
- {
- GivePlayerWeapon(playerid,27,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a combat shotgun");
- GivePlayerMoney(playerid,-500);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $500 for this shotgun");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == smg)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=600)
- {
- GivePlayerWeapon(playerid,28,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a mac 10");
- GivePlayerMoney(playerid,-600);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $600 for this smg");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=600)
- {
- GivePlayerWeapon(playerid,32,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a tec 9");
- GivePlayerMoney(playerid,-600);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $600 for this smg");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=700)
- {
- GivePlayerWeapon(playerid,29,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a mp5");
- GivePlayerMoney(playerid,-700);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $700 for this smg");
- }
- }
- }
- if(GetPlayerMenu(playerid) == assault)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- GivePlayerWeapon(playerid,31,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a m4 assault rifle");
- GivePlayerMoney(playerid,-1000);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $1000 for this m4");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=800)
- {
- GivePlayerWeapon(playerid,30,100);
- SendClientMessage(playerid,COLOR_GOLD,"you have a ak47");
- GivePlayerMoney(playerid,-800);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $800 for this m4");
- }
- }
- }
- if(GetPlayerMenu(playerid) == rifles)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=400)
- {
- GivePlayerWeapon(playerid,33,10);
- SendClientMessage(playerid,COLOR_GOLD,"you have a farmers rifle");
- GivePlayerMoney(playerid,-400);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $400 for this rifle");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=700)
- {
- GivePlayerWeapon(playerid,34,10);
- SendClientMessage(playerid,COLOR_GOLD,"you have a sniper rifle");
- GivePlayerMoney(playerid,-700);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $700 for this rifle");
- }
- }
- }
- else if(GetPlayerMenu(playerid) == thrown)
- {
- switch(row)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid)>=500)
- {
- GivePlayerWeapon(playerid,16,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a grenade");
- GivePlayerMoney(playerid,-500);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $500 for grenades");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid)>=250)
- {
- GivePlayerWeapon(playerid,18,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have a molotov");
- GivePlayerMoney(playerid,-250);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $250 for molotovs");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid)>=1000)
- {
- GivePlayerWeapon(playerid,39,5);
- GivePlayerWeapon(playerid,40,1);
- SendClientMessage(playerid,COLOR_GOLD,"you have 5 satchel charges");
- GivePlayerMoney(playerid,-1000);
- }
- else return SendClientMessage(playerid,COLOR_RED,"you need $1000 for satchel charges");
- }
- }
- }
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- if(GetPlayerMenu(playerid) == Cars) TogglePlayerControllable(playerid,1);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext,"/wc",true))
- {
- ShowMenuForPlayer(Menu:gc,playerid);
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement