I doesn't get help here!!! (need help with command explain)
#1

I can't create a filterscript with using those Objects (AND I still doesn't receive a help), I try to cerate a one (!) gate with command and message to player who open (Gate is open!) and while close (or close automaticly) (Gate is closed!). So, I need a help, because a tutorials can't explait everything good. So, I need tutorial, or create a filterscript (I don't wanna publish).

Gate opened:
id of object: 980, X= 1534.5843505859, Y= -1451.3070068359, Z= 15.159576416016

Gate closed:
id of object: 980 (yes the same), X= 1545.5843505859, Y= -1451.3070068359, Z= 15.159576416016

All rotations are: 0.

Thanks if you helped me.
Reply
#2

Try This :


on top
Код:
new door, DoorOpened;
OnGameModeInit
Код:
door = createobject(980,1534.5843505859, -1451.3070068359,15.159576416016);
DoorOpened = 0;
OnPlayerCommandText
Код:
if(strcmp("/open", cmdtext, true, 10) == 0)
{
if(DoorOpened != 0) return 0;
MoveObject(door,1534.5843505859, -1451.3070068359,10.159576416016,1.00);
SendClientMessage(playerid, 0xFF000000, "The Door Is Opened");
DoorOpened = 1;
}

if(strcmp("/close", cmdtext, true, 10) == 0)
{
if(DoorOpened == 0) return 0;
MoveObject(door,1534.5843505859, -1451.3070068359,15.159576416016,1.00);
SendClientMessage(playerid, 0xFF000000, "The Door Is Closed");
DoorOpened = 0;
}
Reply
#3

if u r using the doors in filterscript u need to define the FS and u have to put the objects under OnFilterScriptInit

well here 1 cmd to open and close with msgs

On Top Of Script

pawn Код:
new Door;
new DoorStatus;
Under OnFilterScriptInit
pawn Код:
Door = CreatObject(980,1534.5843505859, -1451.3070068359,15.159576416016);
And Here your Command

pawn Код:
if(strcmp(cmdtext, "/door", true) == 0)
    {
    if(DoorStatus == 0)
        {
        MoveObject(Door,1534.5843505859,-1451.3070068359,15.159576416016,3.0);
                SendClientMessage(playerid, COLOR_RED, "Doos Is Open");
        GateStatus = 1;
        return 1;
        }
    if(DoorStatus == 1)
    {

    MoveObject(Door,1545.5843505859,-1451.3070068359,15.159576416016, 3.0);
        SendClientMessage(playerid, COLOR_RED, "Doos Closed");
    GateStatus = 0;
    }
    return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)