09.09.2012, 09:08
Is there any fix for that auto reload of weapon when player switch his weapon and the weapon is auto reloaded.
I want to make reloading mandatory.
I want to make reloading mandatory.
new ammo=330;
GivePlayerWeapon(playerid,WEAPON_AK47,30);
ApplyAnimation(playerid,"RIFLE","RIFLE_load",2,0,1,1,0,1000,1);
new rem = GetPlayerAmmo(playerid);
GivePlayerWeapon(playerid,WEAPON_AK47,-rem);
GivePlayerWeapon(playerid,WEAPON_AK47,30);
ammo-=30-rem;
#include <a_samp>
#include <ZCMD>
#include <sscanf2>
new ammo=330;
public OnGameModeInit()
{
AddPlayerClass(0,0,0,0,0,0,0,0,0,0,0);
}
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid,WEAPON_AK47,30);
ammo-=30;
return 1;
}
CMD:r(playerid,params[])
{
#pragma unused params
ApplyAnimation(playerid,"RIFLE","RIFLE_load",2,0,1,1,0,1000,1);
new rem = GetPlayerAmmo(playerid);
GivePlayerWeapon(playerid,WEAPON_AK47,-rem);
GivePlayerWeapon(playerid,WEAPON_AK47,30);
ammo-=30-rem;
new msg[20];
format(msg,20,"New Ammo : %d",ammo);
SendClientMessage(playerid,-1,msg);
return 1;
}