what is wrong?
#1

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...
Reply
#2

please anyone?
Reply
#3

pleasehelpme
Reply
#4

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);
Reply
#5

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?
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)