Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp.inc
- forward loopobject1();
- new bool: stateloop;
- new oggetto;
- public OnFilterScriptInit()
- {
- oggetto=CreateObject(3279, 235.90894, 1957.52258, 16.82031, 356.85840, 0.00000, 3.14159);
- return 1;
- }
- public loopobject1(){
- if(stateloop){
- MoveObject(oggetto, 235.90894, 1957.52258, 20.82031, 2.00);
- stateloop=false;
- } else{
- MoveObject(oggetto, 235.90894, 1957.52258, 16.82031, 2.00);
- stateloop=true;
- }
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/moveobject1", true) == 0)
- {
- stateloop=true;
- SetTimer("loopobject1", 5000, false);
- return 1;
- }
- if(strcmp(cmdtext, "/moveobject2", true) == 0)
- {
- stateloop=false;
- SetTimer("loopobject1", 5000, false);
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement