22.03.2014, 11:51
Simple Weapon Shop
I've created these basic weapon commands,
Some weapons have not been added.
The weapons cost money, if you do not have enough you will not be able to purchase them.
To view all the available weapons type /weapon
Place This in your script
________________________________________________
You can change the prices of the weapons if you like..
I've created these basic weapon commands,
Some weapons have not been added.
The weapons cost money, if you do not have enough you will not be able to purchase them.
To view all the available weapons type /weapon
Place This in your script
________________________________________________
Код:
#include <zcmd> #define SERVER_NAMES 0x33CCFFAA "{33CCFF}" //Blue #define SERVER_LOCATIONS 0x1FE802FF "{1FE802}"//Light Green #define SERVER_TEXT 0xFFFF00AA "{FFFF00}"//S&S Yellow #define COLOR_GREY 0xAFAFAFAA "{AFAFAF}" #define MONEY_GREEN 0x005302FF "{005302}"// Money Green #define SERVER_NOTIFICATIONS 0x99069DFF "{99069D}"//Purple #define DEFAULT_WHITE 0xFFFFFFFF "{FFFFFF}" //white //==========WEAPON COMMANDS==========// CMD:weapon(playerid,params[]) { ShowPlayerDialog(playerid,4542,DIALOG_STYLE_MSGBOX,"WEAPON-COMMANDS","\n{FFFF00}/brass /golfclub /nightstick /bat /shovel /poolcue\n/katana /chainsaw /purpledildo /bigvibrator /flowers /cane\n/colt45 /silencedcolt45 /deserteagle /shotgun /sawnoff /combat\n/mac10 /mp5 /ak47 /m4 /tec9 /rifle\n/sniper /spraycan /extinguisher /camera /parachute","Close",""); return 1; } CMD:brass(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase {33CCFF}Knuckle Dusters"); } GivePlayerWeapon(playerid,1,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased {33CCFF}Knuckle Dusters"); GivePlayerMoney(playerid, -5000); return 1; } CMD:golfclub(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF} Golf Club"); } GivePlayerWeapon(playerid,2,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased {33CCFF}Golf Club"); GivePlayerMoney(playerid, -5000); return 1; } CMD:nightstick(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Night Stick"); } GivePlayerWeapon(playerid,3,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Night Stick"); GivePlayerMoney(playerid, -5000); return 1; } CMD:bat(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Bat"); } GivePlayerWeapon(playerid,5,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Bat"); GivePlayerMoney(playerid, -5000); return 1; } CMD:shovel(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Shovel"); } GivePlayerWeapon(playerid,6,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Shovel"); GivePlayerMoney(playerid, -5000); return 1; } CMD:poolcue(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Pool Cue"); } GivePlayerWeapon(playerid,7,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Pool Cue"); GivePlayerMoney(playerid, -5000); return 1; } CMD:katana(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Katana"); } GivePlayerWeapon(playerid,8,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Katana"); GivePlayerMoney(playerid, -5000); return 1; } CMD:chainsaw(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Chainsaw"); } GivePlayerWeapon(playerid,9,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Chainsaw"); GivePlayerMoney(playerid, -5000); return 1; } CMD:purpledildo(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Purple Dildo"); } GivePlayerWeapon(playerid,10,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Purple Dildo"); GivePlayerMoney(playerid, -5000); return 1; } CMD:bigvibrator(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Big Vibrator"); } GivePlayerWeapon(playerid,11,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Big Vibrator"); GivePlayerMoney(playerid, -5000); return 1; } CMD:flowers(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase Some{33CCFF}Flowers"); } GivePlayerWeapon(playerid,14,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased some {33CCFF}Flowers"); GivePlayerMoney(playerid, -5000); return 1; } CMD:cane(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Cane"); } GivePlayerWeapon(playerid,15,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Cane"); GivePlayerMoney(playerid, -5000); return 1; } CMD:colt45(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Colt 45"); } GivePlayerWeapon(playerid,22,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Colt 45"); GivePlayerMoney(playerid, -5000); return 1; } CMD:silencedcolt45(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Colt 45 (Silenced)"); } GivePlayerWeapon(playerid,23,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Colt 45 (Silenced)"); GivePlayerMoney(playerid, -5000); return 1; } CMD:deserteagle(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Desert Eagle"); } GivePlayerWeapon(playerid,24,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Desert Eagle"); GivePlayerMoney(playerid, -5000); return 1; } CMD:shotgun(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Shotgun"); } GivePlayerWeapon(playerid,25,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Shotgun"); GivePlayerMoney(playerid, -5000); return 1; } CMD:sawnoff(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Sawnoff Shotgun"); } GivePlayerWeapon(playerid,26,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Sawnoff Shotgun"); GivePlayerMoney(playerid, -5000); return 1; } CMD:combat(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Combat Shotgun"); } GivePlayerWeapon(playerid,27,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Combat Shotgun"); GivePlayerMoney(playerid, -5000); return 1; } CMD:mac10(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Mac 10"); } GivePlayerWeapon(playerid,28,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Mac 10"); GivePlayerMoney(playerid, -5000); return 1; } CMD:mp5(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}MP5"); } GivePlayerWeapon(playerid,29,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}MP5"); GivePlayerMoney(playerid, -5000); return 1; } CMD:ak47(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}AK47"); } GivePlayerWeapon(playerid,30,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}AK47"); GivePlayerMoney(playerid, -5000); return 1; } CMD:m4(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}M4"); } GivePlayerWeapon(playerid,31,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}M4"); GivePlayerMoney(playerid, -5000); return 1; } CMD:tec9(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}TEC9"); } GivePlayerWeapon(playerid,32,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}TEC9"); GivePlayerMoney(playerid, -5000); return 1; } CMD:rifle(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Country Rifle"); } GivePlayerWeapon(playerid,33,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Country Rifle"); GivePlayerMoney(playerid, -5000); return 1; } CMD:sniper(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Sniper Rifle"); } GivePlayerWeapon(playerid,34,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Sniper Rifle"); GivePlayerMoney(playerid, -5000); return 1; } CMD:spraycan(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Spray Can"); } GivePlayerWeapon(playerid,41,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Spray Can"); GivePlayerMoney(playerid, -5000); return 1; } CMD:extinguisher(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Fire Extinguisher"); } GivePlayerWeapon(playerid,42,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Fire Extinguisher"); GivePlayerMoney(playerid, -5000); return 1; } CMD:camera(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Camera"); } GivePlayerWeapon(playerid,43,500); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Camera"); GivePlayerMoney(playerid, -5000); return 1; } CMD:parachute(playerid,params[]) { if(GetPlayerMoney(playerid) < 5000) { return SendClientMessage(playerid,-1, "{FFFF00}You Need ${005302}{FFFF00}5000 To Purchase A {33CCFF}Parachute"); } GivePlayerWeapon(playerid,46,1); SendClientMessage(playerid,-1, "{AFAFAF}[{99069D}ITEM BOUGHT{AFAFAF}] {FFFF00}You have just purchased a {33CCFF}Parachute"); GivePlayerMoney(playerid, -5000); return 1; }