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
__________________