Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define TCMD:%1(%2,%3) forward tcmd_%1(%2,%3); public tcmd_%1(%2,%3)
- #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new pos, tkstring[150];
- while (cmdtext[pos] != ' ' && pos != -1)
- {
- if (!cmdtext[pos]) { pos = -1; break; }
- tolower(cmdtext[pos]);
- tkstring[pos+4] = cmdtext[pos];
- pos++;
- }
- tkstring[0] = 't', tkstring[1] = 'c', tkstring[2] = 'm', tkstring[3] = 'd', tkstring[4] = '_';
- if(pos == -1) return CallLocalFunction(tkstring, "ds", playerid, "\1");
- return CallLocalFunction(tkstring, "ds", playerid, cmdtext[pos+1]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement