Advertisement
TheKiller

Untitled

Aug 8th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #define TCMD:%1(%2,%3) forward tcmd_%1(%2,%3); public tcmd_%1(%2,%3)
  2. #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
  3. public OnPlayerCommandText(playerid, cmdtext[])
  4. {
  5. new pos, tkstring[150];
  6. while (cmdtext[pos] != ' ' && pos != -1)
  7. {
  8. if (!cmdtext[pos]) { pos = -1; break; }
  9. tolower(cmdtext[pos]);
  10. tkstring[pos+4] = cmdtext[pos];
  11. pos++;
  12. }
  13. tkstring[0] = 't', tkstring[1] = 'c', tkstring[2] = 'm', tkstring[3] = 'd', tkstring[4] = '_';
  14. if(pos == -1) return CallLocalFunction(tkstring, "ds", playerid, "\1");
  15. return CallLocalFunction(tkstring, "ds", playerid, cmdtext[pos+1]);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement