05.02.2012, 14:28
ok,
so I have this small bit of code:
http://pastebin.com/XQjG37jn
note: foreach is the same as for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
and the first pos[0] - pos[3] are from the object id that I shot, its updating every 250ms, so this piece of code is inside a timer.
Well the problem starts at the first loop already... I added: if(playerid != i), but seems that sometimes this piece of code is even occuring for the playerid himself and not other ids..
So I tried many stuff and well seems there should be nothing wrong with this piece of code. So I guess it is a sampbug -_-. The playerid looses health and gets a bloodobject around them, but the other id (= i) gets nothing. This happens sometimes.. I even tried checking it with a client message, but even that says there isn't a change of id. So it should take the right playerid... But why?
so I have this small bit of code:
http://pastebin.com/XQjG37jn
note: foreach is the same as for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
and the first pos[0] - pos[3] are from the object id that I shot, its updating every 250ms, so this piece of code is inside a timer.
Well the problem starts at the first loop already... I added: if(playerid != i), but seems that sometimes this piece of code is even occuring for the playerid himself and not other ids..
So I tried many stuff and well seems there should be nothing wrong with this piece of code. So I guess it is a sampbug -_-. The playerid looses health and gets a bloodobject around them, but the other id (= i) gets nothing. This happens sometimes.. I even tried checking it with a client message, but even that says there isn't a change of id. So it should take the right playerid... But why?