OnPlayerWeaponShoot - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerWeaponShoot (
/showthread.php?tid=618980)
OnPlayerWeaponShoot -
MerryDeer - 12.10.2016
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
Re: OnPlayerWeaponShoot -
SyS - 12.10.2016
what what? what the heck you mean?
For the people like you this thread is created
https://sampforum.blast.hk/showthread.php?tid=30938
Re: OnPlayerWeaponShoot -
MerryDeer - 12.10.2016
So other, If you shoot to player, OnPlayerWeaponShoot will be called first ,or onplayertakedamage?
Re: OnPlayerWeaponShoot -
SyS - 12.10.2016
Quote:
Originally Posted by MerryDeer
So other, If you shoot to player, OnPlayerWeaponShoot will be called first ,or onplayertakedamage?
|
before answering....whats the point?
Re: OnPlayerWeaponShoot -
MerryDeer - 12.10.2016
I'am making anti cheat, if player not make weaponshoot, but onplayertakedamage get called, i can kick that player
Re: OnPlayerWeaponShoot -
SyS - 12.10.2016
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
Re: OnPlayerWeaponShoot -
IceBilizard - 12.10.2016
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
Re: OnPlayerWeaponShoot -
MerryDeer - 12.10.2016
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;
}
}
Re: OnPlayerWeaponShoot -
SyS - 12.10.2016
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?
Re: OnPlayerWeaponShoot -
MerryDeer - 12.10.2016
But kick i need issuerid? and Shootedd[ issuerid ] = false, why you remove?