static pWeapons[12] = {0};
static pAmmo[12] = {0};
public OnPlayerUpdate(playerid)
{
new weapons[12], ammo[12];
for(new s = 0; s < 12; s++)
{
GetPlayerWeaponData(playerid, s, weapons[s], ammo[s]);
if(weapons[s] != pWeapons[s] && GetPVarInt(playerid, "Weapons") != 1) BanEx(playerid, "Cheat!");
pWeapons[s] = weapons[s];
}
}
SetPVarInt(playerid, "Weapon", 1);
stock AC_GivePlayerWeapon(playerid, weaponid, muni)
{
SetPVarInt(playerid, "Weapon", 1);
GivePlayerWeapon(playerid, weaponid, muni);
SetTimerEx("stopWeapon", 300, false, "i", playerid);
return 1;
}
forward stopWeapon(playerid);
public stopWeapon(playerid)
{
DeletePVar(playerid, "Weapon");
return 1;
}
static pWeapons[12] = {0};
static pAmmo[12] = {0};
public OnPlayerUpdate(playerid)
{
new weapons[12], ammo[12];
for(new s = 0; s < 12; s++)
{
GetPlayerWeaponData(playerid, s, weapons[s], ammo[s]);
if(weapons[s] != pWeapons[s] && GetPVarInt(playerid, "Weapons") != 1) BanEx(playerid, "Cheat dgun !");
pWeapons[s] = weapons[s];
}
return 1;
}
GetPVarInt(playerid, "Weapons")
SetPVarInt(playerid, "Weapon", 1);
pawn Код:
pawn Код:
|