Advertisement
Guest User

Untitled

a guest
Jan 6th, 2021
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1.  
  2. // CLIENT-SIDE
  3.  
  4. addCommandHandler("exec_c",function(cmd,text)
  5. {
  6. if ( text )
  7. {
  8. try
  9. {
  10. local my_code = compilestring(text);
  11. my_code();
  12. }
  13. catch ( e ) { message("Error: "+e); }
  14. } else { message("Usage: /exec_c code"); }
  15. });
  16.  
  17. // SERVER-SIDE
  18.  
  19. addCommandHandler("exec_s",function(cmd,text,client)
  20. {
  21. if(text)
  22. {
  23. try
  24. {
  25. local my_code = compilestring(text);
  26. my_code();
  27. }
  28. catch ( e ) { messageClient("Error: "+e,client); }
  29. }
  30. else
  31. {
  32. message("Usage: /exec_s code");
  33. }
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement