Raised This Month: $ Target: $400
 0% 

Help With Sprites And Origin stuff!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rixorster
Senior Member
Join Date: Jul 2005
Old 12-23-2005 , 11:02   Help With Sprites And Origin stuff!
Reply With Quote #1

Well, when i use this code:
Code:
public ssjtrans1(){     client_cmd(0, "spk goku/scream2.wav");     new iOrigini[3];       get_user_origin(0, iOrigini, 0);       for(new i = 0; i < 6; i++){                   message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigini );                   write_byte ( TE_SPRITETRAIL );                   write_coord( iOrigini[0] );                   write_coord( iOrigini[1] );                   write_coord( iOrigini[2] );                   write_coord( iOrigini[0] );                   write_coord( iOrigini[1] );                   write_coord( iOrigini[2] );                   write_short( trans1 );                   write_byte ( 5 );                   write_byte ( 10 );                   write_byte ( 5 );                   write_byte ( 10 );                   write_byte ( 40 );                   message_end();     }       return PLUGIN_HANDLED }
With set_task:
Code:
    set_task(6.0, "ssjtrans1")
, it plays the sound, but when it comes to the part where the sprite is supposed to appear, the console says:
Code:
L 12/22/2005 - 17:43:09: Invalid player id 0
L 12/22/2005 - 17:43:09: [AMXX] Displaying debug trace (plugin "ssjsecret.amxx")
L 12/22/2005 - 17:43:09: [AMXX] Run time error 10: native error (native "get_user_origin")
L 12/22/2005 - 17:43:09: [AMXX]    [0] ssjsecret.sma::ssjtrans1 (line
And, when it runs the function, which runs set_task:
Code:
public ssj5_glow (id) {     new powerlevel = get_pdata_int(id,460);     if ( powerlevel < 2000000 )     {     client_cmd(0, "spk goku/trans2.wav")     entity_set_int(id,EV_INT_sequence,105)     set_task(6.0, "ssjtrans1")     set_pdata_int(id, 460,20000000 )     }     else     {     client_print(id, print_chat, " You are not allowed to be SSJ to do this. ")     }     new iOrigin[3];       get_user_origin(id, iOrigin, 0);       for(new i = 0; i < 6; i++){                   message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );                   write_byte ( TE_SPRITETRAIL );                   write_coord( iOrigin[0] );                   write_coord( iOrigin[1] );                   write_coord( iOrigin[2] - 1 );                   write_coord( iOrigin[0] );                   write_coord( iOrigin[1] );                   write_coord( iOrigin[2] + 1 );                   write_short( ascending );                   write_byte ( 5 );                   write_byte ( 10 );                   write_byte ( 5 );                   write_byte ( 10 );                   write_byte ( 40 );                   message_end();     }     return PLUGIN_HANDLED }
This:
Code:
    entity_set_int(id,EV_INT_sequence,105)
It wont work, it wont run the animation :/ And, when it spawns the sprite, it spawns many of them, and its supposed to spawn only one, and keep it at the same place where player is, even if player is in air And, also, i need to know how to make the player stay still? And, when i changed the:
Code:
    get_user_origin(0, iOrigini, 0);
to:
Code:
    get_user_origin(id, iOrigini, 0);
it said symbol id not found. :/ Please help asap
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster 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 16:12.


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