- Something
- Saturday, June 23rd, 2007 at 7:01:17am MDT
- #include <a_samp>
- #define MAX_WEAPON_SLOTS 12
- new PlayerDBWeapons[MAX_PLAYERS][MAX_WEAPON_SLOTS];
- new PlayerDBAmmo[MAX_PLAYERS][MAX_WEAPON_SLOTS];
- new GiveTheWeaponsBack[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print(" Anti Drive-by Kit - v1.0 by Ramjet Loaded.");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print(" Anti Drive-by Kit - v1.0 by Ramjet Unloaded.");
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- for(new i; i < MAX_WEAPON_SLOTS; i++) GetPlayerWeaponData(playerid, i, PlayerDBWeapons[playerid][i], PlayerDBAmmo[playerid][i]);
- if(PlayerDBWeapons[playerid][4] != 0)
- {
- ResetPlayerWeapons(playerid);
- GiveTheWeaponsBack[playerid] = true;
- }
- }
- else if(newstate == PLAYER_STATE_ONFOOT)
- {
- for(new i; i < MAX_WEAPON_SLOTS; i++) if(GiveTheWeaponsBack[playerid]) GivePlayerWeapon(playerid, PlayerDBWeapons[playerid][i], PlayerDBAmmo[playerid][i]);
- GiveTheWeaponsBack[playerid] = false;
- }
- return 1;
- }
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.