y_extra_other.inc 862 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #if defined _INC_y_extra_other
  2. #endinput
  3. #endif
  4. #define _INC_y_extra_other
  5. // Include pretty much 90% of YSI in one fell swoop!
  6. loadtext core[ysi_commands], core[ysi_help];
  7. YCMD:commands(playerid, params[], help)
  8. {
  9. if (help)
  10. {
  11. Text_Send(playerid, $YSI_COMM_HELP);
  12. }
  13. else
  14. {
  15. new
  16. count = Command_GetPlayerCommandCount(playerid);
  17. for (new i = 0; i != count; ++i)
  18. {
  19. Text_Send(playerid, $YSI_COMM_LIST, Command_GetNext(i, playerid));
  20. }
  21. }
  22. return 1;
  23. }
  24. YCMD:help(playerid, params[], help)
  25. {
  26. if (help)
  27. {
  28. Text_Send(playerid, $YSI_HELP);
  29. }
  30. else
  31. {
  32. if (isnull(params))
  33. {
  34. Text_Send(playerid, $YSI_HELP);
  35. }
  36. else
  37. {
  38. Command_ReProcess(playerid, params, true);
  39. }
  40. }
  41. return 1;
  42. }