SA-MP Forums Archive
Weapons can not use - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weapons can not use (/showthread.php?tid=190354)



Weapons can not use - Kitten - 15.11.2010

Solved


Re: Weapons can not use - The_Moddler - 15.11.2010

GetPlayerWeapon(playerid);


Re: Weapons can not use - Kitten - 15.11.2010

Solved


Re: Weapons can not use - The_Moddler - 15.11.2010

It's with () not with [], are you blind..?


Re: Weapons can not use - Haydz - 15.11.2010

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
It's with () not with [], are you blind..?
pawn Код:
public NoZombieWeapons(playerid)
{
    if(gTeam[playerid] == TEAM_ZOMBIE)
    {
         if(GetPlayerWeapon(playerid) == 38) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == DEAGLE) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == TEC9) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == M4) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == SMG) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == CHAINSAW) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == SMG2) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 22) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 23) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 25) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 26) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 27) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 35) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
         if(GetPlayerWeapon(playerid) == 36) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
    }
    return 1;
}
Should work


Re: Weapons can not use - cessil - 15.11.2010

how about this?
pawn Код:
public NoZombieWeapons(playerid)
{
    if(gTeam[playerid] == TEAM_ZOMBIE)
    {
         if(GetPlayerWeapon(playerid) != 0 && GetPlayerWeapon(playerid) != KNIFE) ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid,KNIFE,600);
    }
    return 1;
}