it dont have error,but i cant take weapon at rank 1.
Printable View
it dont have error,but i cant take weapon at rank 1.
thats kinda the point when you have if(rank < 10) return restricted;
// American
case "m4_mp":
if(!getcvarint("scr_allow_m1carbine") || rank < 10)
{
//self iprintln(&"MP_M1A1_CARBINE_IS_A_RESTRICTED");
response = "restricted";
}
break;
That?
The game will restrict when a dvar is not satisfied, or a player has a rank of less than 10. It sounds like you want it the other way - you want rank 1 players to have access to the weapon. So, the answer is simple: DON'T RESTRICT THEM AT RANK 1!, which is what you are doing.
You need to learn to grasp LOGIC! What you are doing is not logical.
working.
Code:case "m1carbine_mp":
if(self.stats["rank"] < 1)
{
//self iprintln(&"MP_M1A1_CARBINE_IS_A_RESTRICTED");
response = "restricted";
}