25.07.2013, 15:17
Como posso proibir uma certa skin e uma certa arma ?
new weapons[MAX_PLAYERS][13][2]; stock RemovePlayerWeapon(playerid, weaponid) { new plyWeapons[12]; new plyAmmo[12]; for(new slot = 0; slot != 12; slot++) { new wep, ammo; GetPlayerWeaponData(playerid, slot, wep, ammo); if(wep != weaponid) { GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]); } } ResetPlayerWeapons(playerid); for(new slot = 0; slot != 12; slot++) { GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]); } } OnPlayerUpdate(playerid) { for (new i = 0; i < 13; i++) { GetPlayerWeaponData(playerid, i, weapons[playerid][i][0], weapons[playerid][i][1]); if(weapons[playerid][i][0] == id da arma que vc nгo quer) { RemovePlayerWeapon(playerid, id da arma que vc nгo quer); } } }
if (GetPlayerWeapon(playerid) == x) // verifica a arma
{
return false; //Faz o cуdigo para bloquear
}