AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   autosniper 2 scout (https://forums.alliedmods.net/showthread.php?t=27562)

allenwr 04-24-2006 12:42

autosniper 2 scout
 
Hello, I need help for this plugin. (duhhh)
Anyhow. i did not create this plugin only re-coding it for the auto snipers...
All credit goes to ([-3LH-]Geezus) this was his plugin and is his plugin.
oh, and please do not critize me for using this...

now, this compiles fine. no errors. but does not run as far on my server. If you see any errors please help me out.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> public check_sg552(id) {     if (get_cvar_num("amx_sg5522scout")!=1)     {     return PLUGIN_CONTINUE     }else{     new parm[1]     parm[0] = id            set_task(0.1, "drop_sg552", id, parm, 1)     }         return PLUGIN_CONTINUE } public drop_sg552 (parm[]) {     new id = parm[0]     new origin[3]     get_user_origin(id, origin, 0)     origin[2] -= 2000     set_user_origin(id, origin)     engclient_cmd(id, "drop", "weapon_sg552")     give_item(id, "weapon_scout")     give_item(id, "ammo_762nato")     origin[2] += 2005     set_user_origin(id, origin) } public plugin_init() {       register_plugin("sg5522Scout", "0.2", "[-3LH-]Geezus")       register_event("WeapPickup", "check_sg552", "b","1=18")       register_cvar("amx_sg5522scout", "1")       return PLUGIN_CONTINUE }

p3tsin 04-24-2006 13:15

Code:
register_event("WeapPickup", "check_sg552", "b","1=27")
see amxconst.inc, weapon id 18 is for awp and 27 for sg552

allenwr 04-24-2006 13:24

newbie question, where is this at? --> amxconst.inc

p3tsin 04-24-2006 13:55

in addons/amxmodx/scripting/include :)


All times are GMT -4. The time now is 05:03.

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