Raised This Month: $ Target: $400
 0% 

Change entity moving pls help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BANDIT228
Member
Join Date: Sep 2017
Old 08-07-2018 , 15:31   Re: Change entity moving pls help!
Reply With Quote #1

new Float:avelocity[3]
avelocity[1] = someFloatValue; // rotating on y axis
set_pev(entity, pev_avelocity, avelocity);

------------------------------------------------

new Float:g_rotation_matrix[2][2]
new Float:g_vec[3] = {70.0, 0.0, 0.0}
new Float:g_deg = 0;


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
set_task(0.0001, "rotate", 4373, _, _, "b")
}

public rotate(){
new Float, Float:y
x = 70*floatcos(g_deg, degrees);
y = 70*floatsin(g_deg, degrees);
g_deg += 10;

display()

g_vec[0] = x
g_vec[1] = y
}


public display(){
static players[32], pnum, origin[3]
get_players(players, pnum)
for(new i; i<pnum; i++){
get_user_origin(players[i], origin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_SPARKS)
write_coord( floatround(g_vec[0] + origin[0]) )
write_coord( floatround(g_vec[1] + origin[1]) )
write_coord( floatround(g_vec[2] + origin[2]) )
message_end()
}
}



--------------------------------


anything of these good? cmon guys....
BANDIT228 is offline
Reply



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 12:28.


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