28.08.2012, 07:00
Hello i have no idea in how to do this but how would i make these weapons have restrictions so that only level 1337
the weapons are (4,9,35-40)
the weapons are (4,9,35-40)
SetTimer("CheckWeapons", 1000*5, true); // Runs the timer every 5 seconds
forward CheckWeapons();
public CheckWeapons()
{
new weapons[13][2]; // The array where to store the weapon data
for(new p = 0; p < MAX_PLAYERS; p++) // We loop through all the players
{
for (new i = 0; i < 13; i++) // SAMP has 13 weapon slots, so we loop through every one
{
GetPlayerWeaponData(p, i, weapons[i][0], weapons[i][1]); // This gets the weapon data from the weapon slot
if(weapons[i][0] == 4 || weapons[i][0] == 9 || weapons[i][0] == 35 || weapons[i][0] == 36 || weapons[i][0] == 37 || weapons[i][0] == 38 || weapons[i][0] == 39 || weapons[i][0] == 40) // The weaponid will be stored in weapons[i][0], so we check if it matches our weapon ID's
{
GivePlayerWeapon(p, weapons[i][0], 0); // Removes the player's weapon
}
}
}