Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // CLIENT-SIDE
- addCommandHandler("exec_c",function(cmd,text)
- {
- if ( text )
- {
- try
- {
- local my_code = compilestring(text);
- my_code();
- }
- catch ( e ) { message("Error: "+e); }
- } else { message("Usage: /exec_c code"); }
- });
- // SERVER-SIDE
- addCommandHandler("exec_s",function(cmd,text,client)
- {
- if(text)
- {
- try
- {
- local my_code = compilestring(text);
- my_code();
- }
- catch ( e ) { messageClient("Error: "+e,client); }
- }
- else
- {
- message("Usage: /exec_s code");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement