how to check if player is throwing grenade
#1

i guess onplayerweaponshot doesnt support any type of weapons besides bullets so how can i detect if a player is shooting a rocket launcher throwing a grenade or shooting minigun stuff like that

im working on an anticheat its pretty much done i just cant seem to find out how to prevent grenade/ minigun/ flamethrower spray can ammo cuz its doesnt work onplayerweaponshot

please and thank you
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new weaponid = GetPlayerWeapon(playerid);
    if(newkeys & KEY_FIRE && weaponid == 16)//16 for grenade
    {
       // your codes
    }
    return 1;
}
Try it!
Reply
#3

I don't know but this maybe would work too GetPlayerWeapon and a way to see if the throwing animation is used.
Reply
#4

Quote:
Originally Posted by davve95
Посмотреть сообщение
I don't know but this maybe would work too GetPlayerWeapon and a way to see if the throwing animation is used.
what if he has a throwing animation?

that what shaktimaan said should do the job
Reply
#5

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
what if he has a throwing animation?

that what shaktimaan said should do the job
It won't fail because it will check the weapon first.

Yeah!
Reply
#6

Quote:
Originally Posted by davve95
Посмотреть сообщение
It won't fail because it will check the weapon first.

Yeah!
right, appears that i didnt read your post and only say "throwing animation"
apologies,
Reply
#7

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
right, appears that i didnt read your post and only say "throwing animation"
apologies,
No probs!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)