what is wrong? - 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: what is wrong? (
/showthread.php?tid=75263)
what is wrong? -
luckie12 - 30.04.2009
i need help i have a command for open gates but i compiled it it was good no errors
but i go in to the server and i goto the gate i type /opengate 1 it says
GATE OPENED!
but it isnt open
plzz any one help me
here is the code:
pawn Код:
i have added this on top:
new gate1;
this at create objects:
gate1 = CreateObject(980, 1385.557617, -2688.828857, 272.734619, 0.0000, 0.0000, 270.0000); // coords of closed gate
this at OnPlayerCommandText
if (strcmp("/opengate1", cmdtext, true) == 0)
{
MoveObject(gate1, 980, 1385.557617, -2688.828857, 5); //5 is the speed of opening and the coords when the gate is opened
SendClientMessage(playerid, 0x00F600AA, "GATE OPENED !");
return 1;
}
plzzz anyone help me thx alot...
Re: what is wrong? -
luckie12 - 30.04.2009
please anyone?
Re: what is wrong? -
luckie12 - 30.04.2009
pleasehelpme
Re: what is wrong? -
Andom - 30.04.2009
pawn Код:
MoveObject(gate1, 980, 1385.557617, -2688.828857, 5);
You have the wrong params;
You have:
Код:
MoveObject(object, modelid, x, y, speed);
it has to be:
Код:
MoveObject(object, x, y, z, speed);
Re: what is wrong? -
luckie12 - 30.04.2009
Quote:
Originally Posted by Andom
pawn Код:
MoveObject(gate1, 980, 1385.557617, -2688.828857, 5);
You have the wrong params;
You have:
Код:
MoveObject(object, modelid, x, y, speed);
it has to be:
Код:
MoveObject(object, x, y, z, speed);
|
hmm lik this?:
pawn Код:
MoveObject(980, 1385.557617, -2688.828857, 272.734619, 5);
liek that?
Re: what is wrong? -
Chpp - 30.04.2009
MoveObject(gate1, 1385.557617, -2688.828857, 5); //5 is the speed of opening and the coords when the gate is opened
Like that.
You have already defined what's gate1, you can't say it here. You move the object gate, not a random object located over there. Hope I helped