[HELP] Rotating door!
#1

ok, i want this door to turn 90 degrees when i type /Odoor.... (Odoor = Opendoor)
But it has an ERROR too.

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

forward Resetbase();

new Door;

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Door By Larsey123");
    print("-------------------------------------------\n");
   
    Door = CreateObject(2930,370.71026611,-2045.55212402,7.98374319,0.00000000,0.00000000,270.00000000); //object(chinatgate) (1)

    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    //Turn the door 90 degrees
    if (strcmp("/Odoor", cmdtext, true) == 0)
    {
        if(IsPlayerAdmin(playerid)==1)
        {
            SetObjectRot( Door, 0, 0, 90, 2.00 );
            return 1;
        }
    }
    return 0;
}

public Resetbase()
{
    SetObjectRot( Door, 0, 0, 0 );
    }
ERROR:
pawn Код:
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\RotateObject.pwn(27) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
The my question is: How to fix that O.o?
Reply
#2

change
SetObjectRot( Door, 0, 0, 90, 2.00 );

to
SetObjectRot( Door, 0, 0, 90);


because
function is SetObjectRot( objectid, RotX, RotY, RotZ );

here is fixed

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
//Turn the door 90 degrees
if (strcmp("/Odoor", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid)==1)
{
SetObjectRot( Door, 0, 0, 90);
return 1;
}
}
return 0;
}

Reply
#3

Quote:
Originally Posted by ExEx
Посмотреть сообщение
change

SetObjectRot( Door, 0, 0, 90, 2.00 );

to

SetObjectRot( Door, 0, 0, 90);


because
function is SetObjectRot( objectid, RotX, RotY, RotZ );
Oh Thx man, I failed badly there xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)