y_extra_other.inc 785 B

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