Guest User

a_commands - by Zayan

a guest
Apr 20th, 2013
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.98 KB | None | 0 0
  1. /*******************************************************************************
  2.  
  3. Author: Zayan
  4.  
  5. Contact: http://forum.sa-mp.com/member.php?u=194495
  6.  
  7. Updates:            [You can contact the author suggestions]
  8.  
  9.     * If an invalid command is entered, it will return a message 'Invalid Comma-
  10.     nd'
  11.  
  12. \******************************************************************************/
  13.  
  14. #if defined _a_commands_included
  15.     #endinput
  16. #endif
  17. #define _a_commands_included
  18.  
  19. //You can change '@' to anything you want but dont forget to edit it in 'OnPlayerACommandText'.
  20. #define Acmd_Char '@'
  21.  
  22. public OnPlayerText(playerid, text[])
  23. {
  24.     if(text[0] == Acmd_Char)
  25.     {
  26.         CallLocalFunction("OnPlayerACommandText", "ds", playerid, text);
  27.         return 0;
  28.     }
  29.     return 1;
  30. }
  31.  
  32. forward OnPlayerACommandText(playerid, cmdtext[]);
  33. forward OnPlayerAText(playerid, text[]);
  34.  
  35. #if defined _ALS_OnPlayerText
  36.     #undef _ALS_OnPlayerText
  37. #else
  38.     #define _ALS_OnPlayerText
  39. #endif
  40. #define OnPlayerText OnPlayerAText
Advertisement
Add Comment
Please, Sign In to add comment