Raised This Month: $ Target: $400
 0% 

pulling out the knife


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
svendude
Member
Join Date: Aug 2004
Old 10-18-2004 , 21:27   pulling out the knife
Reply With Quote #1

how do u make it so that when you pull out the knife something happenes, but when you switch to another weopon, it turns off the thing it did before?
svendude is offline
Send a message via Yahoo to svendude
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 10-18-2004 , 22:27  
Reply With Quote #2

Does this help?

Code:
public plugin_init() {     register_event("CurWeapon", "event_CurWeapon", "be", "2=29") } public event_CurWeapon(id) {     new isShown = read_data(1)         if (isShown) {         // Code here for when knife is pulled out     } else {         // Code here for when knife is put away     }         return PLUGIN_CONTINUE }
DS is offline
svendude
Member
Join Date: Aug 2004
Old 10-19-2004 , 04:06  
Reply With Quote #3

w00t thx

ps: any1 remember me? no huh
svendude is offline
Send a message via Yahoo to svendude
svendude
Member
Join Date: Aug 2004
Old 10-19-2004 , 04:26  
Reply With Quote #4

ok im a complete noob, but this is wat i got sofar, uncompiled or tested (btw wat is an index!?)

Code:
/* Hey i made this plugin for admins only. Also i'm pretty new to scripting so don't yell at me! */ #include <amxmodx> #include <amxmisc> #include <fun> public plugin_init(){     register_plugin("Scary knife","1.0","Carl/svendude")     register_concmd("amx_knife1","cmdknife",ADMIN_BAN) } public plugin_init() {     register_event("CurWeapon", "event_CurWeapon", "be", "2=29") } public event_CurWeapon(id) {     new isShown = read_data(1)           if (isShown) {         get_user_godmode(1)     } else {         get_user_godmode(2)     }           return PLUGIN_CONTINUE }
svendude is offline
Send a message via Yahoo to svendude
MC-Olivenoel
Member
Join Date: Oct 2004
Old 10-19-2004 , 05:52  
Reply With Quote #5

hi

what is that "get_user_god(1)" ?? u want to know if user 1 has god ??


Code:
/* Hey i made this plugin for admins only. Also i'm pretty new to scripting so don't yell at me! */ #include <amxmodx> #include <amxmisc> #include <fun> public plugin_init(){     register_plugin("Scary knife","1.0","Carl/svendude")     register_event("CurWeapon", "event_CurWeapon", "be", "2=29") } public event_CurWeapon(id) {     if ((get_user_flags(id)&ADMIN_BAN)) {         new isShown = read_data(1)         if (isShown) {             set_user_godmode(id, 0)         } else {             set_user_godmode(id)         }     }     return PLUGIN_HANDLED }
i have not testet it ...

i think u dont need

register_concmd("amx_knife1","cmdknife",ADMIN _BAN)
---

do u want to turn it on/off ???
MC-Olivenoel is offline
svendude
Member
Join Date: Aug 2004
Old 10-19-2004 , 06:33  
Reply With Quote #6

yes, and im a total noob at this =/
svendude is offline
Send a message via Yahoo to svendude
MC-Olivenoel
Member
Join Date: Oct 2004
Old 10-19-2004 , 06:38  
Reply With Quote #7

Quote:
Originally Posted by svendude
yes, and im a total noob at this =/
me too
MC-Olivenoel is offline
svendude
Member
Join Date: Aug 2004
Old 10-19-2004 , 06:40  
Reply With Quote #8

maby i should dump this and start small...
svendude is offline
Send a message via Yahoo to svendude
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 17:10.


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