Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #include a_samp.inc
  2. forward loopobject1();
  3. new bool: stateloop;
  4. new oggetto;
  5. public OnFilterScriptInit()
  6. {
  7. oggetto=CreateObject(3279, 235.90894, 1957.52258, 16.82031, 356.85840, 0.00000, 3.14159);
  8. return 1;
  9. }
  10. public loopobject1(){
  11. if(stateloop){
  12. MoveObject(oggetto, 235.90894, 1957.52258, 20.82031, 2.00);
  13. stateloop=false;
  14. } else{
  15. MoveObject(oggetto, 235.90894, 1957.52258, 16.82031, 2.00);
  16. stateloop=true;
  17. }
  18. }
  19. public OnPlayerCommandText(playerid, cmdtext[])
  20. {
  21. if(strcmp(cmdtext, "/moveobject1", true) == 0)
  22. {
  23. stateloop=true;
  24. SetTimer("loopobject1", 5000, false);
  25. return 1;
  26. }
  27. if(strcmp(cmdtext, "/moveobject2", true) == 0)
  28. {
  29. stateloop=false;
  30. SetTimer("loopobject1", 5000, false);
  31. return 1;
  32. }
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement