Urgent question regarding commands - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Urgent question regarding commands (
/showthread.php?tid=193629)
Urgent question regarding commands -
Wolbol - 26.11.2010
Does anyone know how to script commands which can be toggled by admins? I currently use an admin filterscript, which only works if you login to Rcon ingame. Very useful program though. If any could type me an example, that'll probably do it. Also tell me under what callbacks I have to place it. I'm still a beginner, you know.
Any suggestions/ideas are welcome. I just need this to toggle certain TP commands to certain locations, which shouldn't be available for players at all times.
Respuesta: Urgent question regarding commands -
OwlCity - 26.11.2010
You should use a bool variable that says if you can use the command or not. When the administrator allows to use the command , variable would be var = true, otherwise var = false. The command would be: if (var) {[command ...]} else {[SendClientMessage ("Command not allowed")]}
Something like that. (Bad translate, I am Spanish

)