01.10.2016, 19:57
Put this at the end of the gamemode.
And put this one in the OnPlayerSpawn public.
Код:
stock gCheckPlayerWeapon(playerid, _weaponid)
{
const MAX_WEAPONS_SLOTS = 13;
static ammo, weaponid;
for (new i; i != MAX_WEAPONS_SLOTS; i++)
{
if (GetPlayerWeaponData(playerid, i, weaponid, ammo) == 0)
return 0;
if (weaponid == _weaponid)
return 1;
}
return 0;
}
Код:
if(gCheckPlayerWeapon(playerid, putweaponidhere)) //put the id of the weapon that you desire
{
//attach shotgun code
}

