Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////DONT TOUCH ANYTHING HERE//////////////////////////
- #include <a_samp>
- //----------------------------------------------------
- new Weapon[MAX_PLAYERS][2], Ammo[MAX_PLAYERS][25];
- //----------------------------------------------------
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if((newstate == PLAYER_STATE_DRIVER) || (newstate == PLAYER_STATE_PASSENGER))
- {
- for(new j=0; j<11; j++) GetPlayerWeaponData(playerid, j, Weapon[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, Weapon[playerid][j], Ammo[playerid][j]);
- }
- return 1;
- }
- ////////////The End////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement