Raised This Month: $ Target: $400
 0% 

Native error ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 04-11-2011 , 07:43   Native error ?
Reply With Quote #1

Hey,guys. So I have this plugin here. It shows Win Messages to the team who has won. So it compiles, everything is perfect but when I start the server and the round has ended, it doesn't show the Win Message model and the console prints
"[FUN] Player out of range <0> [AMXX] Displaying debug trace <plugun "winmes.amxx"> [AMXX] Run time error 10:native error <native "strip_user_weapons">"
So can somebody help me please? Here is the code:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
new const ModelCT[] = "models/winCT.mdl"
new const ModelT[] = "models/winT.mdl"
new bool:TWin[33]
new 
bool:CtWin[33]
public 
plugin_init() {
 
// =================================================
 
register_plugin("Win Messages","1.0","MAD.XayC")
 
// =================================================
 
RegisterHam(Ham_Spawn"player""HAM_spawn"1)
 
// =================================================
 
register_event("SendAudio""ct_win""a""2&%!MRAD_ctwin"
 
register_event("SendAudio""t_win""a""2&%!MRAD_terwin"
 
// =================================================
 
register_event("CurWeapon""curweapon""be""1=1")
 
// =================================================
}
public 
plugin_precache() {
 
precache_model(ModelCT)
 
precache_model(ModelT)
}
public 
client_putinserver(id) {
 
TWin[id] = false
 CtWin
[id] = false
}
public 
HAM_spawn(id) {
 
TWin[id] = false
 CtWin
[id] = false

public 
t_win(id) {
 
strip_user_weapons(id)
 
give_item(id"weapon_knife")
 
CtWin[id] = false
 TWin
[id] = true
}
public 
ct_win(id) {
 
strip_user_weapons(id)
 
give_item(id"weapon_knife")
 
CtWin[id] = true
 TWin
[id] = false
}
public 
curweaponid ) {
 if(
TWin[id] == true)
  
set_pev(idpev_viewmodel2ModelT)
 if(
CtWin[id] == true)
  
set_pev(idpev_viewmodel2ModelCT)

Thanks in advance!
dreamedward is offline
 



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 19:52.


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