Raised This Month: $ Target: $400
 0% 

help a beginner amx_weapon 2


Post New Thread Reply   
 
Thread Tools Display Modes
Tyler_durden (gsr)
Junior Member
Join Date: Apr 2005
Old 06-25-2005 , 06:17  
Reply With Quote #11

thx again
1.i think that the right thing is
Code:
cs_set_user_nvg (id,1)
but i'm not sure

2. I can't make the plugin work entirely the "krieg","autosnipe","noclip" dont work even if I have no error.
__________________
IM on xooit.xooit.com
Tyler_durden (gsr) is offline
Send a message via MSN to Tyler_durden (gsr)
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 06-25-2005 , 06:59  
Reply With Quote #12

Quote:
Code:
                {
                somevar = 0
                }
lol thats in correct :p

Code:
                {
                      somevar = 0
                }
Anthraxnz is offline
onfirenburnin420
Senior Member
Join Date: Jan 2005
Old 06-25-2005 , 07:44  
Reply With Quote #13

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public plugin_modules()
{
require_module("cstrike")
require_module("fun")

}

what is the reason fr this????
__________________
onfirenburnin420 is offline
Send a message via AIM to onfirenburnin420
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 06-25-2005 , 07:52  
Reply With Quote #14

the reason for including fun or the reason of making the require modules?
for the first one i think is because you are using give_item()
faluco is offline
onfirenburnin420
Senior Member
Join Date: Jan 2005
Old 06-25-2005 , 08:02  
Reply With Quote #15

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> public plugin_modules() {     require_module("cstrike")     require_module("fun")     } public plugin_init() {     register_plugin("Weapon","1.1","Fire and Tyler")     register_cvar("amx_weapon","1")     register_clcmd("say /m4","m4a1",ADMIN_LEVEL_A,"- Gives m4")     register_clcmd("say /ak","ak47",ADMIN_LEVEL_A,"- Gives ak")     register_clcmd("say /deagle","deagle",ADMIN_LEVEL_A,"- Gives deagle")     register_clcmd("say /mp5","mp5navy",ADMIN_LEVEL_A,"- Gives mp5navy")     register_clcmd("say /smoke","smoke",ADMIN_LEVEL_A,"- Gives smoke")     register_clcmd("say /flash","flash",ADMIN_LEVEL_A,"- Gives flash")     register_clcmd("say /he","he",ADMIN_LEVEL_A,"- Gives he")     register_clcmd("say /awp","awp",ADMIN_LEVEL_A,"- Gives awp")     register_clcmd("say /all","all",ADMIN_LEVEL_B,"- Gives all")     register_clcmd("say /scout","scout",ADMIN_LEVEL_A,"- Gives scout")     register_clcmd("say /nvg","nvg",ADMIN_LEVEL_A,"- Gives Nightvision")     register_clcmd("say /krieg","krieg",ADMIN_LEVEL_A,"- Gives Krieg")     register_clcmd("say /autosnipe","autosnipe",ADMIN_LEVEL_A,"- Gives autosnipe")     register_clcmd("say /noclip","Noclip",ADMIN_LEVEL_A,"- Gives Noclip") }
He inculde fun and cstrike twice
__________________
onfirenburnin420 is offline
Send a message via AIM to onfirenburnin420
onfirenburnin420
Senior Member
Join Date: Jan 2005
Old 06-25-2005 , 08:05  
Reply With Quote #16

This:
Code:
public krieg(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_weapon") !=0) {         give_item(id,"weapon_p228")         cs_set_user_bpammo(id, CSW_P228, 90)     }     return PLUGIN_HANDLED }
Should Look Like This:
Code:
public krieg(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_weapon") !=0) {         give_item(id,"weapon_sg552")         cs_set_user_bpammo(id, CSW_SG552, 90)     }     return PLUGIN_HANDLED }
__________________
onfirenburnin420 is offline
Send a message via AIM to onfirenburnin420
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 06-25-2005 , 08:09  
Reply With Quote #17

i see what you mean, the require_modules dont include again the inc file again. this function is there in case someone installs the plugin but doesnt activate the required modules. in this case instead of having error of functions you will have something like "you need to activate cstrike module and fun to work"
faluco is offline
onfirenburnin420
Senior Member
Join Date: Jan 2005
Old 06-25-2005 , 08:12  
Reply With Quote #18

the reason the krieg is not working becasue you have it giveing a p228 with 90 bullets.....
__________________
onfirenburnin420 is offline
Send a message via AIM to onfirenburnin420
Tyler_durden (gsr)
Junior Member
Join Date: Apr 2005
Old 06-25-2005 , 09:34  
Reply With Quote #19

Is this normal i set up the sg552 like you told me to but it gave me a fivesevn
where is the problem
Code:
public krieg(id,lvl,cid) {     if(!cmd_access(id,lvl,cid,2)) {         return PLUGIN_HANDLED     }     if (get_cvar_num("amx_weapon") !=0) {         give_item(id,"weapon_p228")         cs_set_user_bpammo(id, CSW_SG552, 90)     }     return PLUGIN_HANDLED }
__________________
IM on xooit.xooit.com
Tyler_durden (gsr) is offline
Send a message via MSN to Tyler_durden (gsr)
DahVid
Senior Member
Join Date: Jun 2005
Old 06-25-2005 , 18:06  
Reply With Quote #20

give_item(id,"weapon_p228")
is
give_item(id,"weapon_sg552")
DahVid is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode