19.12.2010, 03:28
[TUT] How To Disable Drive-By's In SA-MP 0.3c
IntroductionIt's seems that some people (or game-mode styles) don't really go well with allowing the newly added "any weapon drive-by" system. I have decided to take 5 minutes and show you how to do this in SA-MP 0.3c...
COMPLETELY Disabling Drive-By's
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(playerid, 0);
return 1;
}
Explanation
We are simply checking to see if a players state has changed to being either the driver, or passenger, of a vehicle. If they are, we will set their "armed (equipped) weapon" to their fist. I don't think that needs to be explained further, does it?P.S. I am adding more to this later, this is just a start!