Hello Guys, i am new here. I have a rank system, and i make a rank shop
i want a "rank check" to get a weapon
so If a guy is rank 5, then he can get "bren_mp"
else
you need more ranks
Hello Guys, i am new here. I have a rank system, and i make a rank shop
i want a "rank check" to get a weapon
so If a guy is rank 5, then he can get "bren_mp"
else
you need more ranks
Hey, i dont know which rank-system you got, but i guess its IzNoGod's.
You can write:
Code:if (player.stats["rank"] < 5) { player iprintlnbold("Get rank 5 first!"); return; }
timescale 0.01
Hmmm please add something how like a script for "bren_mp" and with "else -> not enough rank"
Code:if (player.stats["rank"] < 5) { player iprintlnbold("Get rank 5 first!"); return; } player iprintlnbold("You got Bren!"); player switchToWeapon("bren_mp");
timescale 0.01
also ginge es auch so?
if (player.stats["rank"] < 5)
{
player setweaponslotweapon("primary","bren");
return;
}
else
{
player iprintlnbold("Get rank 5!");
}
Ok, i have
switch(response)
{
case "1":
wepcurrent = self getcurrentweapon();
if(self.money >= 10)
{
if (self.stats["rank"] < 3)
{
self iprintlnbold("Get rank 3 first!");
return;
}
self iprintlnbold("You got Bren!");
self setweaponslotweapon("raygun_mp");
self.money-=10;
self iprintlnbold("^1-10");
self iprintlnbold("^2You bought: Raygun");
}
else if(self.money < 10)
{
self iprintlnbold("^1Not enough Money!");
}
break;
If i am not rank 3 (display: "Get rank 3 first!") <- GOOD
If i am over rank 3 (display: "Get rank 3 first!") <- BAD
1. speak english
2. use [code][/code] for code-format
Yes, that if-else would be also possible, but it makes the code uglier.
I guess your mod doesnt set player.stats["rank"], so it wont work. what rank-mod are you using?
timescale 0.01