Raised This Month: $ Target: $400
 0% 

Invalid player 0 ??


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-23-2005 , 22:46   Invalid player 0 ??
Reply With Quote #1

i keep getting this

Code:
L 09/23/2005 - 22:41:39: Invalid player id 0
L 09/23/2005 - 22:41:39: [AMXX] Displaying debug trace (plugin "SuperSheild.amxx")
L 09/23/2005 - 22:41:39: [AMXX] Run time error 10: native error (native "get_user_origin")
L 09/23/2005 - 22:41:39: [AMXX]    [0] SuperSheild.sma::client_PreThink (line 60)
and i dont know why...

i think it may because its in public client_prethink?

and i just now added the 0 parameter to get_user_origin so dont if thats it either :/

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define PLUGIN "Super Sheild!" #define VERSION "1.0" #define AUTHOR "Zenith77" new sheildEnabled[33] new mXBeam public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_cvar( "sheild_radius", " 500 " )         register_clcmd( "amx_sheild", "activate_sheild", ADMIN_IMMUNITY, " if you dont know, dont worry " )     register_clcmd( "amx_sheild_off", "deactivate_sheild", ADMIN_IMMUNITY, " nfkasnds " ) } public plugin_precache() {         mXBeam = precache_model( "sprites/xbeam1.spr" )         } public activate_sheild(id, level, cid) {         if( !cmd_access(id ,level ,cid, 1)) {         return PLUGIN_CONTINUE     }         sheildEnabled[id] = 1         return PLUGIN_CONTINUE } public deactivate_sheild(id, level, cid) {         if( !cmd_access(id, level, cid, 1)) {         return PLUGIN_CONTINUE     }         return PLUGIN_CONTINUE     } public client_PreThink(id) {         if( sheildEnabled[id] == 1) {         for( new i = 0; i <get_maxplayers(); i++) {                         new distance, origin[3], iOrigin[3]                         get_user_origin(id, origin, 0)             get_user_origin(i, iOrigin, 0)                         distance = get_distance(origin, iOrigin)                         if( distance <= get_cvar_num("sheild_radius") ) {                                                 new iRed = random_num(0, 255)                 new iBlue = random_num(0, 255)                 new iGreen = random_num(0, 255)                                                 message_begin(MSG_BROADCAST, SVC_TEMPENTITY)                 write_byte(1)       // TE_BEAMPOINT                 write_short(id)                 write_coord(iOrigin[0])                 write_coord(iOrigin[1])                 write_coord(iOrigin[2])                 write_short(mXBeam)                 write_byte(0)                 write_byte(10)                 write_byte(10)                 write_byte(30)                 write_byte(5)                 write_byte(iRed)                 write_byte(iBlue)                 write_byte(iGreen)                 write_byte(200)                 write_byte(15)                 message_end()                                 user_kill(i, 1)             }         }     } }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 07:05.


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