Factions (read) - 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)
+--- Thread: Factions (read) (
/showthread.php?tid=487376)
Factions (read) -
MaDsON - 13.01.2014
So basically, there are alot of places in the script where the ranks and divisions are. I want to put a code on each to redirect to another line to get the information that script area needs.
Code:
Код:
case 1: rank = "rank";
case 2: rank = "rank";
case 1: rank = "rank";
case 3: rank = "rank";
case 4: rank = "rank";
case 5: rank = "rank";
case 6: rank = "rank";
case 7: rank = "rank";
case 8: rank = "rank";
case 9: rank = "rank";
I have 13 factions.. So I'll have them all on tbe top of the script and have them there so when I want to change the ranks, I won't have to go everywhere where it needs for the ranks Nd just place the changes there.
Posting from my phone, so if anyone needs codes from the commands, I can supply tomorrow.
Re: Factions (read) -
MaDsON - 13.01.2014
Bump. Still pendin.
Re: Factions (read) -
iGetty - 13.01.2014
If you want to make it like this:
pawn Код:
stock GetRank(playerid)
{
new faction = PlayerInfo[playerid][Faction], rank = PlayerInfo[playerid][Rank], str[25];
switch(faction)
{
case 0:
{
if(rank == 1)str = "text";
else if(rank == 2)str = "text";
}
}
return str;
}
So on and so forth.