problem with driveby - 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: problem with driveby (
/showthread.php?tid=485912)
problem with driveby -
Antoniohl - 06.01.2014
How to disable Driveby?? look at this picture
Re: problem with driveby - Patrick - 06.01.2014
This, searching could help you, but sometimes people do not have
common sense
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) // Player entered a vehicle as a driver or passenger
{
return SetPlayerArmedWeapon(playerid, 0);
}
return true;
}
Re: problem with driveby -
Antoniohl - 06.01.2014
Can't find it.
Re: problem with driveby -
Konstantinos - 06.01.2014
Quote:
Originally Posted by pds2k12
This, searching could help you, but sometimes people do not have common sense
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) // Player entered a vehicle as a driver or passenger { return SetPlayerArmedWeapon(playerid, 0); } return true; }
|
It's better not to check the oldstate at all because if a player is passenger and he/she gets in a vehicle with a command or something (as driver), it won't set armed weapon to fist.
Quote:
Originally Posted by Antoniohl
Can't find it.
|
Anti drive-by
Re: problem with driveby -
Antoniohl - 06.01.2014
Man you're the best <3 i will rep+ you when i have 50posts+, promise

but remind me hehe'