Script Reading
#1

Alright, so I had an idea.

I was thinking how could I could add commands ingame without needing to restart server.
I have a clue that its possible but would require a very good mind.
Basicly you would have a Folder called Commands.
Then everytime I wanna add a command I create a file called ban.cfg
(I'll use /ban for example)
Ban is the Command and in that file would be some PAWN script.
Is it possible that I could script it so I could do like /load ban and then /ban will be now on the server?
Then if I do /unload ban it removes the command?

Even if the cfg files didnt have PAWN script.
Is there a way I could add new functions, commands and stuff using something? like in the cfg file.

Command=ban
ReplaceName=true (If true, changes Playername to Playersname)
DoesItKick=true
AddtoBanned=true
DoesItTeleport=false
TeleportX=0.0,0.0,0.0
TeleportY=0.0,0.0,0.0
TeleportZ=0.0,0.0,0.0
ShowDialog=false
DialogID=0
ClientMessage=Playername has been Banned! (Playername will be found and changed to Players name)
ClientMessageColor=Red
ShowTextdraw=false
TextdrawID=0

-------------------------------------------------------

Thats an example of some stuff you could put in.
But is it possible?
Could anyone guide me in the right direction on how I could implement this, or atleast tell me how I can do it with OnPlayerCommandText
Reply
#2

y_commands already allows you to add/remove commands ingame.
Reply
#3

Yes, what if I wanna Add Functions and more script into server without GMXing. Restarting server.
Reply
#4

I doubt its possible because it (the functions/commands) would still need to be compiled in order to work. May be possible if you make a plugin idk.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)