How would I make an admin command?
#1

Hello everyone,
I have used this tutorial to make a register and login system for my server. Is there a way that you can add admin commands like /kick /ban /mute etc, to this register + login script?

Here is the tut that i got the script from: https://sampforum.blast.hk/showthread.php?tid=101560

Thanks

Kind Regards,
Tessar
Reply
#2

Instead of following tutorials on how to do specific things. Instead look for tutorials that explain scripting basics and how it works as a whole. This way you can imagine how it would work, and work out the logics yourself.

Most of the tutorials here aren't really tutorials anyway, just copy-and-paste kind of guidelines how to install specific things to your serve... I guess what I'm suggesting is read real tutorials, instead of "tutorials".

Creating admin commands is nothing complex. You add a extra variable to each player called "AdminLevel" or.. whatever you choose. And check the value of that variable on these commands you wish to make admin commands.
I also highly suggest that you look into zCmd system right at the beginning, as it is both faster and simpler to use than any other. Oh, and sscanf, look into that too.
Reply
#3

I made a tutorial in the tutorials section, check it.
Reply
#4

Quote:

I made a tutorial in the tutorials section, check it.

I did but now i need the admin commands like /kick /ban /spectate.
Reply
#5

Use wiki.sa-mp.com.
Search for Kick(playerid); and Ban(playerid); and PlayerSpectatePlayer.
Look at the examples and read more about it on the forums here, you'll pick up a little by little.
Scripting isnt something you learn just over night. It takes a lot of time and effort.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)