SA-MP Forums Archive
Gate commands not working! Please help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gate commands not working! Please help (/showthread.php?tid=90764)



Gate commands not working! Please help - 3d0v - 10.08.2009

Код:
if(strcmp(cmd, "/mufopen", true) == 0) { // Command
   MoveObject(980,1040.461,1136.494,13.098,0.0,0.0,42.112); // Starting coords
   SendClientMessage(playerid, COLOR_RED, "The Base gate is OPEN"); // Messege to tell it worked
   return 1;
   }
   if(strcmp(cmd, "/mufclose", true) == 0) { // Command
   MoveObject(980,1040.461,1136.494,19.098,0.0,0.0,42.112); // New Coords
   SendClientMessage(playerid, COLOR_GREEN, "The Base gate is CLOSED"); //Messege to tell it worked
   return 1;
   }
I have got this code, joined my test server and typed them in however the object does not move, when i compile i get this

Код:
C:\Documents and Settings\stefan\Desktop\SAMP\gamemodes\lvdm.pwn(182) : warning 202: number of arguments does not match definition
C:\Documents and Settings\stefan\Desktop\SAMP\gamemodes\lvdm.pwn(182) : warning 202: number of arguments does not match definition
C:\Documents and Settings\stefan\Desktop\SAMP\gamemodes\lvdm.pwn(187) : warning 202: number of arguments does not match definition
C:\Documents and Settings\stefan\Desktop\SAMP\gamemodes\lvdm.pwn(187) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.



Re: Gate commands not working! Please help - CAR - 10.08.2009

Put in OnGameModeInit();

muf = (980,1040.461,1136.494,13.098,0.0,0.0,42.112);

In the command you put:
//open
MoveObject(muf,1040.461,1136.494,13.098,5.00); // Starting coords (5.00 is the speed)

//close
MoveObject(muf,1040.461,1136.494,19.098,5.00); // New Coords (5.00 is again the speed)



Re: Gate commands not working! Please help - Weirdosport - 10.08.2009

Quote:
Originally Posted by CAR
Put in OnGameModeInit();

muf = (980,1040.461,1136.494,13.098,0.0,0.0,42.112);
Errr, you might want a CreateObject in there:

pawn Код:
muf = CreateObject(980,1040.461,1136.494,13.098,0.0,0.0,42.112);



Re: Gate commands not working! Please help - CAR - 19.08.2009

Yes that I mean