Raised This Month: $ Target: $400
 0% 

Need help with sprite plugin for TS


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sephiroth_nightmare
Junior Member
Join Date: Apr 2005
Old 04-09-2005 , 16:57   Need help with sprite plugin for TS
Reply With Quote #1

Hi, am new to AMX coding, and i need some help with my plugin, i have been working on it all day, and i need to to bring a sprite onto the screen (covering the player) once the player tyeps the command in the console, now my problem is that when i get in game, i type the command in the console and it gives me an error

Code:
L 04/09/2005 - 21:55:39: [AMXX] Native error in "precache_model" on line 20 (file "ssjtransform.sma")
and am not sure how to fix it, here is my plugin code

Code:
#include <amxmodx> #include <fun> new PLUGIN[]="ssjtransform" new AUTHOR[]="PvtHudson" new VERSION[]="1.00"  public plugin_init() {     register_clcmd("amx_ssjtrans","spawn_sprite")     register_plugin(PLUGIN, VERSION, AUTHOR)        return PLUGIN_CONTINUE } new theSprite;  public spawn_sprite(id){    theSprite = precache_model("sprites/trans.spr"); }  public myfunction(id) {         new spriteorigin[3];    get_user_origin(id,spriteorigin);        message_begin(MSG_BROADCAST,SVC_TEMPENTITY);    write_byte(17);    write_coord(spriteorigin[0]);      write_coord(spriteorigin[1]);    write_coord(spriteorigin[2]);    write_short(theSprite);      write_byte(20);        write_byte(200);      message_end(); } public plugin_precache() {         return PLUGIN_CONTINUE }

now im going to guess theres alot wrong with my code, i have been looking in this forum for about 2 hours for help and snippets that might help me with my code.

can any one correct my code for me?

thanks
Pvthudson/Sephiroth_nightmare
sephiroth_nightmare is offline
 


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 09:53.


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