Ranks and questions
#1

Hey how I change admin rank names and make score table? Like deathmatch score, race and more...?
Also admin logs, if some admin ban player it will display "Admin NAME banned NAME reason: HACK
Reply
#2

someone?
Reply
#3

24 hour bumps.

Admin ranks don't update so you could use something a bit more advanced, but all you need to do is simply make an array and use that for storing the names.

Scores do, and can use the normal array, it depends more on what you need to do after you store them (List being the main 'reason' and sorting being the next usual step, along with 'top').

As for admin logs, that's more a case of simply outputting to server_log.txt which can be done with...

PHP код:
printf("Admin: %s (%d) banned %s (%d) Reason: %s"GetPlayerName(playerid), playeridGetPlayerName(targetid), targetidreason); 
No idea if that code even works, but it's something simple if it does.
Reply
#4

And I need to edit admin permissions commands, how to do it? Where to find it?
Reply
#5

Quote:
Originally Posted by Philip123
Посмотреть сообщение
And I need to edit admin permissions commands, how to do it? Where to find it?
Do you mean you want to add admin level requirement to the command? If that's so, you need to do it as following:
Let's say you have a variable which has player's administrator level stored in it, like pAdmin or something. In that case in the beginning of every command that requires an administrative level check, you do this:

Код:
if(strcmp(...)) //or cmd:CMDName(...) in case you use zcmd, whatever.
{
     if(pAdmin < 1) return SendClientMessage(playerid, COLOR_GREY, "Only level 1+ administrators can use this command!");
     ...
}
As long as the calling player's admin level is less than 1, he won't be able to use that command. Change the number in the check accordingly to requirements you want to set.

You have to remember to use enums and some file-related functions I'd say, to save the admin level for the player etc.

--If that's not what you meant, be more specific, since I am afraid people still aren't psychics and can't read thoughts.
Reply
#6

Quote:
Originally Posted by Maxandmov
Посмотреть сообщение
Do you mean you want to add admin level requirement to the command? If that's so, you need to do it as following:
Let's say you have a variable which has player's administrator level stored in it, like pAdmin or something. In that case in the beginning of every command that requires an administrative level check, you do this:

Код:
if(strcmp(...)) //or cmd:CMDName(...) in case you use zcmd, whatever.
{
     if(pAdmin < 1) return SendClientMessage(playerid, COLOR_GREY, "Only level 1+ administrators can use this command!");
     ...
}
As long as the calling player's admin level is less than 1, he won't be able to use that command. Change the number in the check accordingly to requirements you want to set.

You have to remember to use enums and some file-related functions I'd say, to save the admin level for the player etc.

--If that's not what you meant, be more specific, since I am afraid people still aren't psychics and can't read thoughts.
where to put this?

AND SEW_SUMI. where do i put this too? And i mean, this message will show in game, not only in logs so every online admin in server can see that banning log
Reply
#7

They gave you an example, not a working code. Take it and do it yourself, it shouldn't be that hard. If you rather get it done by someone else, you will never learn how to do it yourself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)