problem
#1

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

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

ok, i test it

Edit: Same
Reply
#4

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

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

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 :$
Reply
#7

fixed
http://pastebin.com/9qRHHvp0

+rep pls
Reply
#8

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

+rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)