22.11.2014, 03:33
(
Последний раз редактировалось Raweresh; 23.12.2014 в 01:52.
Причина: Update
)
It's, in my opinion, the simplest possible script with weapons shop using files. There is one command named /Weapons. Updated version have ammunation shops with discounts.
![[Image: Sscanf.png]](https://lh6.******usercontent.com/-01UV40N9F5o/VJjKNCE_3AI/AAAAAAAAAIU/7hCPnPAU-Q0/w410-h163-no/Sscanf.png)
![[Image: Streamer.png]](https://lh5.******usercontent.com/-NDtO3HS5w1U/VJjMWM61VGI/AAAAAAAAAJs/oN3oKNPsoWM/w530-h163-no/Streamer.png)
![[Image: Bez%2Bnazwy.png]](https://lh4.******usercontent.com/-58Nm5PjRpyE/VJjMV6iqrZI/AAAAAAAAAJk/gxlzsXOfyxA/w290-h163-no/Bez%2Bnazwy.png)
![[Image: Weapons%2BShop%2BSystem.png]](https://lh4.******usercontent.com/-DLlvw8Sg6Qo/VJjNcH4uyQI/AAAAAAAAAKM/P0F4b_qoY-g/w1598-h218-no/Weapons%2BShop%2BSystem.png)
If you want to change the id, name, ammo or the price of the weapon, do it in the file WSS.cfg.
Data record looks like this:
Код:
1|Brass Knuckles|1|1000 2|Golf Club|1|1000 3|Nightstick|1|1000 4|Knife|1|1000 5|Baseball Bat|1|1000 6|Shovel|1|1000 7|Pool Cue|1|1000 8|Katana|1|1000 9|Chainsaw|1|1000 10|Purple Dildo|1|1000 11|Dildo|1|1000 12|Vibrator|1|1000 13|Silver Vibrator|1|1000 14|Flowers|1|1000 15|Cane|1|1000 16|Grenade|50|50000 17|Tear Gas|50|50000 18|Molotov Cocktail|50|50000 22|9mm|850|10000 23|Silenced 9mm|850|15000 24|Desert Eagle|350|25000 25|Shotgun|50|20000 26|Sawnoff Shotgun|100|25000 27|Combat Shotgun|350|25000 28|Micro SMG/Uzi|5000|25000 29|MP5|5000|20000 30|AK-47|1500|20000 31|M4|5000|25000 32|Tec-9|5000|25000 33|Country Rifle|50|20000 34|Sniper Rifle|50|25000 41|Spraycan|25000|1000 42|Fire Extinguisher|25000|1000 43|Camera|50|1000 46|Parachute|1|1000
![[Image: Definitions.png]](https://lh6.******usercontent.com/-pnQITtv_t7g/VJjN93vuoOI/AAAAAAAAAK4/IXhIXj3vG9U/w1064-h244-no/Definitions.png)
Код:
#define WSS_MAXIMAL_WEAPONS 35 #define WSS_MAXIMAL_WEAPON_NAME 32 #define WSS_MAXIMAL_AMMUNATIONS 11 #define WSS_COLOR_WHITE 0xFFFFFFFF #define WSS_COLOR_RED 0xFF0000FF #define WSS_COLOR_GREEN 0x00FF00FF #define WSS_WHITE "{FFFFFF}" #define WSS_GREEN "{00FF00}" #define WSS_DIALOG_ONE 0 #define WSS_DIALOG_TWO 1 #define WSS_DISCOUNT 10
Change WSS_MAXIMAL_WEAPONS if you add or remove weapon from the file.
Change WSS_MAXIMAL_AMMUNATIONS if you add or remove ammunation from script.
Change WSS_DIALOG_ONE if you are using dialog id 0 in your gamemode or other scripts.
Change WSS_DIALOG_TWO if you are are using dialog id 1 in your gamemode or other scripts.
Change WSS_DISCOUNT if you want to change discount percent in ammunation shops.
![[Image: F5q2KFE3ni9lSxQQOMEty_paSJTCVdYmLCB1w_st...64-h244-no]](https://lh6.******usercontent.com/F5q2KFE3ni9lSxQQOMEty_paSJTCVdYmLCB1w_stGeQ=w1064-h244-no)
Change WSS_MAXIMAL_AMMUNATIONS if you add or remove ammunation from script.
Change WSS_DIALOG_ONE if you are using dialog id 0 in your gamemode or other scripts.
Change WSS_DIALOG_TWO if you are are using dialog id 1 in your gamemode or other scripts.
Change WSS_DISCOUNT if you want to change discount percent in ammunation shops.
![[Image: sa-mp-000.png]](https://lh5.******usercontent.com/-4hlIDS5TTlk/VJjQtzcVBpI/AAAAAAAAAMM/MQe12vnajFk/w1580-h889-no/sa-mp-000.png)
![[Image: sa-mp-001.png]](https://lh5.******usercontent.com/-zjBROtRjuWA/VJjQxGEEP0I/AAAAAAAAAMc/vUC2mdyNvcU/w1580-h889-no/sa-mp-001.png)
![[Image: sa-mp-005.png]](https://lh3.******usercontent.com/--MGHueo9pa4/VJjVShHOrsI/AAAAAAAAAPA/f_8F4M3mAOM/w1580-h889-no/sa-mp-005.png)
![[Image: sa-mp-003.png]](https://lh3.******usercontent.com/-44fpyQYkzJs/VJjQz0HxGiI/AAAAAAAAAMk/6V_8TCsQv34/w1580-h889-no/sa-mp-003.png)
![[Image: sa-mp-004.png]](https://lh5.******usercontent.com/-7UiG_XWm0n4/VJjQ17krVJI/AAAAAAAAAM0/IAuOUEmPBOM/w1580-h889-no/sa-mp-004.png)