Advertisement
Guest User

Untitled

a guest
Mar 15th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include <a_samp>
  2. #include <SpikeStrip>
  3.  
  4. strtok(const string[], &index)
  5. {
  6. new length = strlen(string);
  7. while ((index < length) && (string[index] <= ' '))
  8. {
  9. index++;
  10. }
  11.  
  12. new offset = index;
  13. new result[20];
  14. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  15. {
  16. result[index - offset] = string[index];
  17. index++;
  18. }
  19. result[index - offset] = EOS;
  20. return result;
  21. }
  22.  
  23. public OnPlayerCommandText(playerid, cmdtext[])
  24. {
  25. new cmd[256];
  26. new idx;
  27. cmd = strtok(cmdtext, idx);
  28.  
  29. if (strcmp(cmd,"/ezys",true) == 0)
  30. {
  31. new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
  32. GetPlayerPos(playerid, plocx, plocy, plocz);
  33. GetPlayerFacingAngle(playerid,ploca);
  34. CreateStrip(plocx,plocy,plocz,ploca);
  35. return 1;
  36. }
  37. else if (strcmp(cmd,"/pezys",true) == 0)
  38. {
  39. DeleteClosestStrip(playerid);
  40. return 1;
  41. }
  42. else if (strcmp(cmd,"/pvezys",true) == 0)
  43. {
  44. DeleteAllStrip();
  45. return 1;
  46. }
  47.  
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement