Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Weapons[MAX_PLAYERS][11], Ammo[MAX_PLAYERS][11];
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if((newstate == PLAYER_STATE_DRIVER) || (newstate == PLAYER_STATE_PASSENGER))
- {
- for(new j=0; j<11; j++) GetPlayerWeaponData(playerid, j, Weapons[playerid][j], Ammo[playerid][j]);
- ResetPlayerWeapons(playerid);
- }
- if((newstate == PLAYER_STATE_ONFOOT) && ((oldstate == PLAYER_STATE_DRIVER) || (oldstate == PLAYER_STATE_PASSENGER)))
- {
- for(new j=0; j<11; j++) GivePlayerWeapon(playerid, Weapons[playerid][j], Ammo[playerid][j]);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement