SA-MP Forums Archive
problem - 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)
+--- Thread: problem (/showthread.php?tid=319937)



problem - davidxxx - 20.02.2012

Hello, sorry i need help.

as I can make a door swings frequently, as a fan.

i have this command, but not working.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Juego", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid,4040.94, 2054.01, 183.86);
        MoveObject(Door, 4052.39, 2043.73, 183.86, 5.0, 0.00, 180.0, 0.00);
        SetTimer("Rot",1000,true);
        return 1;
    }
    return 0;
}

forward Rot();
public Rot()
{
MoveObject(Door, 4052.39, 2043.73, 183.86, 5.0, 0.00, 180.0+180.0, 0.00);
return 1;
}
thanks


Re: problem - ReneG - 20.02.2012

Silly Question. When you type the command IG. Do you type it like
or like if you are typing it the first way, then that's your problem. strcmp is a string comparer, and is case sensitive. So typing the "j" lowercase might be your problem.


Respuesta: problem - davidxxx - 20.02.2012

ok, i test it

Edit: Same


Re: problem - Vince - 20.02.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Silly Question. When you type the command IG. Do you type it like
  • Код:
    /juego
or like
  • Код:
    /Juego
if you are typing it the first way, then that's your problem. strcmp is a string comparer, and is case sensitive. So typing the "j" lowercase might be your problem.
Doesn't matter, since ignorecase is set to true.

The problem is that the object is not actually being moved; both sets of coords are the same. The function therefor acts like the old SetObjectRot. You need to move the object with just a tiny bit (say 0.01) over any axis to solve the problem.


Re: problem - MP2 - 20.02.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Silly Question. When you type the command IG. Do you type it like
  • Код:
    /juego
or like
  • Код:
    /Juego
if you are typing it the first way, then that's your problem. strcmp is a string comparer, and is case sensitive. So typing the "j" lowercase might be your problem.
Actually, he set ignorecase to true.

What happens? Define 'not working'.

To make an object spin constantly, you should use OnObjectMoved.


Respuesta: problem - davidxxx - 20.02.2012

Yes i used this, but the problem is, the door is moved 180 degrees and before stop, and not move more

I don speak english very well :$


Re: problem - chrism11 - 21.02.2012

fixed
http://pastebin.com/9qRHHvp0

+rep pls


Respuesta: Re: problem - davidxxx - 21.02.2012

Quote:
Originally Posted by chrism11
Посмотреть сообщение
thanks bro is so so that i think, Thnaks Same

+rep