11.01.2012, 20:20
Im fixing it, hold on.
EDIT:
Try This
EDIT:
Try This
pawn Код:
stock GiveWeaponToPlayer(playerid,WeaponName[])
{
// Pistols
else if (!strcmp(WeaponName == "9mm") && PlayerInfo[playerid][pRank] >=1) // Rank 1+
{
GivePlayerWeapon(playerid,22,20); //9mm
}
else if (!strcmp(WeaponName == "Silenced 9mm") && PlayerInfo[playerid][pRank] >=5)
{
GivePlayerWeapon(playerid,23,20); // Silenced 9mm
}
else if (!strcmp(WeaponName == "Deagle") && PlayerInfo[playerid][pRank] >=5)
{
GivePlayerWeapon(playerid,24,20); // Deagle
}
//Automatics
else if (!strcmp(WeaponName == "Micro SMG") && PlayerInfo[playerid][pRank] >=7)
{
GivePlayerWeapon(playerid,28,100); // Micro SMG
}
else if (!strcmp(WeaponName == "Tec 9") && PlayerInfo[playerid][pRank] >=18)
{
GivePlayerWeapon(playerid,32,100); // tec9
}
else if (!strcmp(WeaponName == "mp5") && PlayerInfo[playerid][pRank] >=29)
{
GivePlayerWeapon(playerid,29,100); // mp5
}
else if (!strcmp(WeaponName == "ak47") && PlayerInfo[playerid][pRank] >=35)
{
GivePlayerWeapon(playerid,30,100); // ak47
}
else if (!strcmp(WeaponName == "m4") && PlayerInfo[playerid][pRank] >=42)
{
GivePlayerWeapon(playerid,31,100); // m4
}
//Shotguns
else if (!strcmp(WeaponName == "Barrel Shotgun") && PlayerInfo[playerid][pRank] >=7)
{
GivePlayerWeapon(playerid,25,30); //barrel shotgun
}
else if (!strcmp(WeaponName == "Combat Shotgun") && PlayerInfo[playerid][pRank] >=19)
{
GivePlayerWeapon(playerid,27,30); // combat shotgun
}
else if (!strcmp(WeaponName == "Sawnoff Shotgun") && PlayerInfo[playerid][pRank] >=32)
{
GivePlayerWeapon(playerid,26,30); // sawnoff
}
//Rifles
else if (!strcmp(WeaponName == "Country Rifle") && PlayerInfo[playerid][pRank] >=9)
{
GivePlayerWeapon(playerid,33,30); // country rifle
}
else if (!strcmp(WeaponName == "Sniper Rifle") && PlayerInfo[playerid][pRank] >=12)
{
GivePlayerWeapon(playerid,34,30); // sniper rifle
}
// Heavy Duty
else if (!strcmp(WeaponName == "Flamethrower") && PlayerInfo[playerid][pRank] >=19)
{
GivePlayerWeapon(playerid,37,15); // flamethrower
}
else if (!strcmp(WeaponName == "RPG") && PlayerInfo[playerid][pRank] >=26)
{
GivePlayerWeapon(playerid,35,2); // rpg
}
// Miscellaneous
else if (!strcmp(WeaponName == "Grenade") && PlayerInfo[playerid][pRank] >=3)
{
GivePlayerWeapon(playerid,16,2); // grenade
}
else if (!strcmp(WeaponName == "Tear Gas") && PlayerInfo[playerid][pRank] >=6)
{
GivePlayerWeapon(playerid,17,2); // tear gas
}
else if (!strcmp(WeaponName == "Molotov Cocktail") && PlayerInfo[playerid][pRank] >=9)
{
GivePlayerWeapon(playerid,18,2); // molotov cocktail
}
return 1;
}