Raised This Month: $ Target: $400
 0% 

set_user_xxx doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Feivel
Junior Member
Join Date: Apr 2004
Old 04-26-2004 , 18:31   set_user_xxx doesn't work
Reply With Quote #1

I'm writing my first plugin. For matters of legiblity i've cut the unimportant parts:

#include <amxmod>
#include <amxmisc>
#include <fun>

public plugin_init() {
register_plugin("AimTrain", "1.0", "Feivel")
register_clcmd("say aim", "Start_Aim", ADMIN_VOTE, " : Starts a new aiming session")
}


public Start_Aim(id, level, cid) {
if (!cmd_access(id, level, cid, 1)) {
return PLUGIN_HANDLED
}

new player[32] = {33, ...}
new num = 0
new health = 500
client_print(id, print_center, "Starting a new Round")
get_players(player, num)
set_user_health(id, health)
/* Some Code */
return PLUGIN_HANDLED
}

as long as I leave the "set_user_health"-line away the plugin runs fine. But when i use it i get a bad load for the plugin. In fact the plugin doesen't work with no set_user_xxx-function like set_user_armor and so on.
I played a bit around with all kind of indexes, numbers, ids and whatever. But nothin helps. Even copied code from other plugins doesn't work.

Someone knows why? thanks in advance.
Feivel is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 04-27-2004 , 00:43  
Reply With Quote #2

#include <amxmodx> instead of #include <amxmod>
__________________
Nick is offline
Send a message via MSN to Nick
BAILOPAN
Join Date: Jan 2004
Old 04-27-2004 , 01:58  
Reply With Quote #3

you don't have the fun module enabled
__________________
egg
BAILOPAN is offline
Feivel
Junior Member
Join Date: Apr 2004
Old 04-27-2004 , 03:08  
Reply With Quote #4

@Nick I don't have the file amxmodx. Where can i get it and where's the difference to the "normal" amxmod?

@Bailopan How do I activate modules?
Feivel is offline
BAILOPAN
Join Date: Jan 2004
Old 04-27-2004 , 04:21  
Reply With Quote #5

www.amxmodx.org/doc

open modules.ini and remove the comments ";"
__________________
egg
BAILOPAN is offline
Feivel
Junior Member
Join Date: Apr 2004
Old 04-27-2004 , 07:53  
Reply With Quote #6

Indeed i had to declarate it in metamod's plugin.ini to. That was the fault.

Thanks for your fast help.
Feivel is offline
Hangman5386
Member
Join Date: Mar 2004
Old 04-27-2004 , 09:30  
Reply With Quote #7

Defining modules is only needed in old AMX versions. Since most of these old versions are really outdated, I'd have a look at AMXX if I were you.
Hangman5386 is offline
Feivel
Junior Member
Join Date: Apr 2004
Old 04-27-2004 , 10:09  
Reply With Quote #8

lol
i never noticed theres a difference between amx and amxx Shame on me.
Ok, this "might" be the source of many of my problems. Would be worth a try :9
Feivel is offline
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-27-2004 , 10:12  
Reply With Quote #9

You might also want to try to use entity_set_int(id,EV_INT_health,health), instead of the user function...
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 04-27-2004 , 11:34  
Reply With Quote #10

Quote:
Originally Posted by IceMouse[WrG
]You might also want to try to use entity_set_int(id,EV_INT_health,health), instead of the user function...
eh... why =/
__________________
My Plugins

Got ??
AssKicR is offline
Reply


Thread Tools
Display Modes

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 23:35.


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