Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnFilterScriptInit()
- {
- print(" Anti-Driveby succesfuly loaded.");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- new PlayerWeapon[MAX_PLAYERS][12];
- new PlayerWeaponAmmo[MAX_PLAYERS][12];
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if (newstate==PLAYER_STATE_DRIVER){
- for(new i=0;i<12;i++){
- GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]);
- }
- ResetPlayerWeapons(playerid);
- }
- if (newstate==PLAYER_STATE_ONFOOT && oldstate==PLAYER_STATE_DRIVER){
- for(new i=0;i<12;i++){
- GivePlayerWeapon(playerid, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment