Need fast help! -
NuggaN_ - 14.01.2011
Well, I am trying to do this Admin thingy there
https://sampforum.blast.hk/showthread.php?tid=174575
but well, there are only cmds and nothing how to do Admin Ranking. can anyone tell me how do I add admin ranks, or how do I create them? I want maximum 6 ranks. 6 should be highest. How do I do this? How can I set the admin level with it and well, the cmd's I can do by myself. Please help! Need to know please write me codes with explaination!
And how do I do this with Factions? The rankings? (leader.., newbie etc..)
Re: Need fast help! -
Kase - 14.01.2011
What do you mean with "admin ranking"? Do you want to give a name to admin levels?
Re: Need fast help! -
alpha500delta - 14.01.2011
You could try with something like PlayerInfo[playerid] [AdminLevel] = 1; or 2
Then add if(PlayerInfo[playerid] [AdminLevel] == 2) for your commands. You can save it using Dini
Re: Need fast help! - [L3th4l] - 14.01.2011
A simple admin rankings; you can probly do this:
pawn Код:
new
Rank[16],
Str[16];
switch(Playerinfo[playerid][AdminLevel])
{
// Change to your own likings.
case 1: Rank = "Rank 1";
case 2: Rank = "Rank 2";
case 3: Rank = "Rank 3";
case 4: Rank = "Rank 4";
case 5: Rank = "Rank 5";
case 6: Rank = "Rank 6";
}
format(Str, sizeof(Str), "%s", Rank);
Or
pawn Код:
stock GetRank(iPlayer)
{
new
Rank[16];
switch(PlayerInfo[iPlayer][AdminLevel])
{
// Change to your own likings.
case 1: Rank = "Rank 1";
case 2: Rank = "Rank 2";
case 3: Rank = "Rank 3";
case 4: Rank = "Rank 4";
case 5: Rank = "Rank 5";
case 6: Rank = "Rank 6";
}
return Rank;
}
AW: Need fast help! -
NuggaN_ - 14.01.2011
I mean, I want to do Admin Levels/Rankings. If you check this Post
https://sampforum.blast.hk/showthread.php?tid=174575
there are commands, and also IfIsPlayerAdminLevel < 3 blabla. But there doesnt stand how to add Levels, from 1 up to level 6. I want do 6 Admin ranks/levels. 6 should be highest. Each level has his own commands etc.
So, any way to do it? Please tell me! And also for Factions, the leader rank, member, newbie etc!
Re: Need fast help! -
DeadAhead - 14.01.2011
Actually. THAT Tutorial HAS Levels. Commands should look like this:
(Example with level 5)
Код:
if (PInfo[playerid][Level] >= 5)
{
// What admin command does here
}
else
{
// what happens if the player doesn't have the right admin level
}
AW: Need fast help! -
NuggaN_ - 15.01.2011
it has the function, if player has this level. BUT I have to define them. How, and how to use that it saves it etc in Dini and that I can give it myself later
Re: Need fast help! -
Kwarde - 15.01.2011
Quote:
pawn Код:
stock GetRank(iPlayer) { new Rank[16]; switch(PlayerInfo[iPlayer][AdminLevel]) { // Change to your own likings. case 1: Rank = "Rank 1"; case 2: Rank = "Rank 2"; case 3: Rank = "Rank 3"; case 4: Rank = "Rank 4"; case 5: Rank = "Rank 5"; case 6: Rank = "Rank 6"; } return Rank; }
|
Add rank 0 too :P - No Admin, and an default. Then it's a bit better
pawn Код:
stock GetRank(iPlayer)
{
new
Rank[20];
switch(PlayerInfo[iPlayer][AdminLevel])
{
// Change to your own likings.
case 0: Rank = "No Admin";
case 1: Rank = "Rank 1";
case 2: Rank = "Rank 2";
case 3: Rank = "Rank 3";
case 4: Rank = "Rank 4";
case 5: Rank = "Rank 5";
case 6: Rank = "Rank 6";
default: Rank = "Unknown";
}
return Rank;
}
AW: Need fast help! -
NuggaN_ - 15.01.2011
and with Dini? So it saves the admin level of the player. So a Command to give, a dini thingy to save the level. How do I do that

?
AW: Need fast help! -
NuggaN_ - 15.01.2011
Kwarde could you write a code with some explaination how to use is with Dini. I mean, saving adminlevels, reading. With DiniSet and DiniIntSet. I need it for stats also, please help!