01.08.2017, 13:07
i dont recommand to use onplayerkeystatechange
listen carfuly
dont give weapons by GivePlayerWeapon, Create a stock GiveWeapon
int the stock save the weapons data like this:
than go to OnPlayerWeaponShot and check if have the weapon that he shoot with like this:
then you dont need to kick someone because it is reset his weapons, dont let him shot because we returned 0
and give him again the weapons.
have fun, and if you liked it leave a +rep
sorry for my english
listen carfuly
dont give weapons by GivePlayerWeapon, Create a stock GiveWeapon
int the stock save the weapons data like this:
Quote:
stock GiveWeapon(playerid,weapon,ammo) { format(str,10,"weap%d",weapon); SetPVarInt(playerid,str,1); format(str,10,"wslot%d",GetWeaponSlot(weapon)); SetPVarInt(playerid,str,weapon); format(str,10,"weapammu%d",weapon); SetPVarInt(playerid,str,ammo); format(str,10,"weapammumax%d",weapon); SetPVarInt(playerid,str,ammo); GivePlayerWeapon(playerid,weapon,ammo); } |
Quote:
new store[10]; format(store,10,"wslot%d",GetWeaponSlot(weaponid)) ; if(GetPVarInt(playerid,store) != weaponid && weaponid != 46) { // report to admins ResetPlayerWeapons(playerid); for(new i = 1; i <= 34; i++) { format(store,10,"weap%d",i); if(GetPVarInt(playerid,store) == 1) { format(store,10,"weapammu%d",i); GivePlayerWeapon(playerid,i,GetPVarInt(playerid,st ore)); } } return 0;//Shot wont be fired } |
and give him again the weapons.
have fun, and if you liked it leave a +rep
sorry for my english
