Advertisement
Hirsw0w

Untitled

Jul 21st, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. public OnFilterScriptInit()
  8. {
  9. CreateObject(18853, 1842.85193, -2195.60718, 43.86293, 0.00000, -45.00000, 0.00000);
  10. CreateObject(18853, 1805.99463, -2195.59375, 132.79930, 0.00000, 0.00000, 0.00000);
  11. CreateObject(18853, 1843.01489, -2195.49902, 222.15445, 0.00000, 45.00000, 0.00000);
  12. CreateObject(18853, 1932.80957, -2195.48096, 259.34003, 0.00000, 90.00000, 0.00000);
  13. CreateObject(18853, 2022.57654, -2195.47729, 222.13429, 0.00000, 135.00000, 0.00000);
  14. CreateObject(18853, 2059.86206, -2195.53638, 132.20639, 0.00000, 180.00000, 0.00000);
  15. CreateObject(18853, 2022.80627, -2195.55640, 42.88428, 0.00000, 225.00000, 0.00000);
  16. return 1;
  17. }
  18.  
  19. public OnPlayerCommandText(playerid,cmdtext[]) {
  20. new cmd[30],id[20],idx;
  21. cmd = strtok(cmdtext,idx),id = strtok(cmdtext,idx);
  22. if(!strcmp("/v",cmd,false)) {
  23. new Float:Origin[3];
  24. GetPlayerPos(playerid,Origin[0],Origin[1],Origin[2]);
  25. CreateVehicle(strval(id),Origin[0],Origin[1],Origin[2],0,0,0,60);
  26. }
  27. }
  28.  
  29. public OnFilterScriptExit()
  30. {
  31. return 1;
  32. }
  33.  
  34. strtok(const string[], &index)
  35. {
  36. new length = strlen(string);
  37. while ((index < length) && (string[index] <= ' '))
  38. {
  39. index++;
  40. }
  41.  
  42. new offset = index;
  43. new result[20];
  44. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  45. {
  46. result[index - offset] = string[index];
  47. index++;
  48. }
  49. result[index - offset] = EOS;
  50. return result;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement