[URL] https://amxx.pl/topic/18836-plugin-freeweapon/
Jest to plugin który zrobiłem z nudów i by się czegoś
nauczyć
![[Image: biggrin.gif]](https://amxx.pl/public/style_emoticons/default/biggrin.gif)
Jest to banalny plugin a mianowicie.
Gdy admin wpisze **free** dostaje MP5 DGL HE FB SG
a jeśli wpisze go gracz pisze np: **KmP'eR tylko dla admina!!**
**Instalacja:**
Standardowa
Oto .sma:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "AdminFreeWeapon"
#define VERSION "0.2"
#define AUTHOR "KmP'eR"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd ("free","free_weapon")
}
public free_weapon(id){
if(access(id,ADMIN_LEVEL_C)){
give_item (id,"weapon_mp5navy")
give_item (id,"weapon_mp5navy" )
give_item (id,"weapon_mp5navy" )
give_item (id,"weapon_mp5navy" )
give_item (id,"weapon_deagle")
give_item (id,"weapon_deagle")
give_item (id,"weapon_deagle")
give_item (id,"weapon_deagle")
give_item (id,"weapon_flashbang")
give_item (id,"weapon_flashbang")
give_item (id,"weapon_smokegrenade")
give_item (id,"weapon_hegrenade")
set_hudmessage(255, 255, 255, 0.02, 0.71, 0, 6.0, 5.0)
show_hudmessage(id, "Dostales: MP5 DGL HE FB SG")
}
else{
new szName [32];
get_user_name(id, szName, 31)
set_hudmessage(42, 42, 255, 0.02, 0.71, 0, 6.0, 5.0)
show_hudmessage(id, "%s tylko dla admina!!", szName)
}
}
Załączone pliki
* [url=https://amxx.pl/index.php?app=core&module=attach§ion=attach&attach_id=3683 "Pobierz załącznik"]
![[Image: rar.gif]](https://amxx.pl/public/style_extra/mime_types/rar.gif)
Użytkownik **KmP'eR** edytował ten post 03.01.2010 22:29
Załączniki:
admin_weapon.rar