OnPlayerWeaponShoot
#1

Hi,

I take look and see with cheat's can off this function not called, so how check if this function was not called if player shooted do smth kick or whatever
Reply
#2

what what? what the heck you mean?
For the people like you this thread is created https://sampforum.blast.hk/showthread.php?tid=30938
Reply
#3

So other, If you shoot to player, OnPlayerWeaponShoot will be called first ,or onplayertakedamage?
Reply
#4

Quote:
Originally Posted by MerryDeer
Посмотреть сообщение
So other, If you shoot to player, OnPlayerWeaponShoot will be called first ,or onplayertakedamage?
before answering....whats the point?
Reply
#5

I'am making anti cheat, if player not make weaponshoot, but onplayertakedamage get called, i can kick that player
Reply
#6

Quote:
OnPlayerWeaponShot
Description:
This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots).

OnPlayerTakeDamage
Description:
This callback is called when a player takes damage.
next time use common sense and ****** search (bruh im talking to a wall)

Listen i dont give any fuck if you ignore this or not but if you dont want to get banned consider the following:

*If you have small questions post in here :https://sampforum.blast.hk/showthread.php?tid=30938
*search and think before posting something
*read this: https://sampforum.blast.hk/showthread.php?tid=574725
*dont act like brain dead or like a bot.
*we are not your slaves,we are not spending time in helping you not because we dont have any other things to do.
*Test your self first,put some effort,dont expect to be spoon-fed
Reply
#7

I think he want make a anti-weapon hacking but he can't said it clearly

here you go check this link and btw its not requesting thread so next time search before asking questions about script request and threads

https://sampforum.blast.hk/showthread.php?tid=534376
Reply
#8

So i can do like that?

Код:
new bool:Shootedd[ MAX_PLAYERS ];
OnPlayerWeaponShoot( ... )
{
Shootedd[ playerid ] = true;
}

OnPlayerTakeDamage( ...)
{
   if( Shootedd[ playerid ] == false )
{
   if( weapon == (all weapons can fire, callonplayerweaponshoot)
{
   Kick(playerid);
} 
}
else
{
Shootedd[ playerid ] = false;
}
}
Reply
#9

Quote:
Originally Posted by MerryDeer
Посмотреть сообщение
So i can do like that?

Код:
new bool:Shootedd[ MAX_PLAYERS ];
OnPlayerWeaponShoot( ... )
{
Shootedd[ playerid ] = true;
}

OnPlayerTakeDamage( ...)
{
   if( Shootedd[ playerid ] == false )
{
   if( weapon == (all weapons can fire, callonplayerweaponshoot)
{
   Kick(playerid);
} 
}
else
{
Shootedd[ playerid ] = false;
}
}
Код:
OnPlayerTakeDamage( ...)
{
   if( Shootedd[ issuerid ] == false )//check if issuerid is invalid or not before this.
{
   if( weapon == (all weapons can fire, callonplayerweaponshoot)
{
   Kick(playerid);
} 
}
why im helping you again?
Reply
#10

But kick i need issuerid? and Shootedd[ issuerid ] = false, why you remove?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)