AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TFC Plugin. (https://forums.alliedmods.net/showthread.php?t=26135)

Waylay 03-27-2006 12:43

TFC Plugin.
 
Iv'e made my 4rd plugin..it works,almost..here's the code:

Code:

#include <amxmodx>
#include <fun>
#include <tfcx>

public plugin_init() {
register_plugin("conc_rockets","1.00","Waylay")
register_event("ResetHUD", "giverl", "be")
register_clcmd("say needrocket", "giverl")
}

public giverl(id){
user_has_weapon(id,TFC_WPN_RPG,1)
}

Just a small 1...But it works to get the weapon..but i cant choose it to use it !!

ObscureAlucard 03-29-2006 23:49

what do you mean? choose the weapon and use it?

[ --<-@ ] Black Rose 03-30-2006 03:07

I think that sets your selected weapon and doesent give you any weapon.
Use give_item(id, "weapon_?") ( if it works for TFC )

Waylay 03-30-2006 13:56

When i do i get 1 error.

NewUser 03-30-2006 15:05

Quote:

Originally Posted by Waylay
When i do i get 1 error.

Tell us the error?

Waylay 03-31-2006 07:09

Code:
/home/users/amxmodx/tmp3/phpvbCHoV.sma(12) : error 037: invalid string (possibly non-terminated string) /home/users/amxmodx/tmp3/phpvbCHoV.sma(12 -- 13) : warning 215: expression has no effect

Hawk552 03-31-2006 08:19

Try this:

Code:
#include <amxmodx> #include <amxmisc> #include <tfcx> public plugin_init() {     register_plugin("Conc Rockets","1.0","Hawk552")     register_clcmd("say needrocket","fnSayNeedRocket") } public fnSayNeedRocket(id)     if(user_has_weapon(id,TFC_WPN_RPG))         tfc_setbammo(id,TFC_AMMO_ROCKETS,tfc_getbammo(id,TFC_AMMO_ROCKETS) + 1)

Waylay 04-01-2006 02:47

ty think it worked :P

Waylay 04-01-2006 12:00

Nope

Hawk552 04-01-2006 12:33

Quote:

Originally Posted by Waylay
Nope

what


All times are GMT -4. The time now is 16:46.

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