Hey all :)
I have this code which is called when a player touchs another.
PHP Code:
set_msg_block(deathMsg,BLOCK_ONCE)
set_msg_block(scoreMsg,BLOCK_ONCE)
user_silentkill(pTouched)
make_deathmsg(pToucher,pTouched,0,"knife")
cs_set_user_deaths(pTouched,cs_get_user_deaths (pTouched)+1)
set_user_frags(pToucher,get_user_frags(pToucher) + 1)
But the rank plugin of amxx does not count this. :(
And another question I have. Is there a faster way to check 2 players distance to each other than the following method?
PHP Code:
public distance_check() {
if(get_pcvar_num(g_distancecheck) && !wait) {
for(new i=1;i<33;i++) {
if(is_user_alive(i)) {
for(new x=1;x<33;x++) {
if(is_user_alive(x) && is_visible(x,i) && i != x && team[i-1] != team[x-1]) {
new iOrigin[3], xOrigin[3]
get_user_origin(i,iOrigin)
get_user_origin(x,xOrigin)
if(get_distance(iOrigin,xOrigin) <= get_pcvar_num(g_distance)) {
if(team[i-1] == 1 && team[x-1] == 0)
touch(i,x)
else
touch(x,i)
}
}
}
}
}
}
}
__________________