Gate Problem :(
#1

The Gate is there... After I use the command /opengate 1111 I get the message Saying that its Opened but its not I tried using /opengate 1111 and /closegate 1111 but neither of them opens it

pawn Код:
#include <a_samp>
#include <streamer>

#define FILTERSCRIPT
#pragma tabsize 0

#define COLOR_BLUE 0x0000BBAA

#define COLOR_RED 0xAA3333AA

#define COLOR_LIGHTBLUE 0x33CCFFAA

new Gate1;

public OnFilterScriptInit()
{

    Gate1 = CreateObject(980,1337.3000488,687.9000244,12.6000004,0.0000000,0.0000000,270.0000000);
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/opengate 1111", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 1337.3000488,687.9000244,12.6000004,0.0000000,0.0000000,270.0000000)){
            MoveObject(Gate1, 1337.3000488,687.9000244,17.6509991,0.0000000,0.0000000,270.0000000);
            SendClientMessage(playerid, COLOR_BLUE, "Gate(1) Opened Successfuly , Weclome !");
            return 1;
        }
    }
    if(!strcmp(cmdtext, "/closegate 1111", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 1337.3000488,687.9000244,12.6000004,0.0000000,0.0000000,270.0000000)){
            MoveObject(Gate1, 1337.3000488,687.9000244,17.6509991,0.0000000,0.0000000,270.0000000);
            SendClientMessage(playerid, COLOR_RED, "Gate(1) Closed successfuly !");
            return 1;
        }
    }
    return 0;
}
public OnFilterScriptExit()
{
    return 1;
}
Reply
#2

- Its could be bugged, did you tried restarting your server and try again?

If not, try re-scripting it again.
Reply
#3

Quote:
Originally Posted by |Xenon|Mapper|
Посмотреть сообщение
- Its could be bugged, did you tried restarting your server and try again?

If not, try re-scripting it again.
I also get 6 Warnings...

Код:
C:\Users\ADRIAN\Desktop\Gates.pwn(25) : warning 202: number of arguments does not match definition
C:\Users\ADRIAN\Desktop\Gates.pwn(25) : warning 202: number of arguments does not match definition
C:\Users\ADRIAN\Desktop\Gates.pwn(25) : warning 202: number of arguments does not match definition
C:\Users\ADRIAN\Desktop\Gates.pwn(32) : warning 202: number of arguments does not match definition
C:\Users\ADRIAN\Desktop\Gates.pwn(32) : warning 202: number of arguments does not match definition
C:\Users\ADRIAN\Desktop\Gates.pwn(32) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
Reply
#4

you are using same coordinates for opened, and closed position
pawn Код:
MoveObject(Gate1, 1337.3000488,687.9000244,17.6509991,0.0000000,0.0000000,270.0000000);
and https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#5

You only did Open, you never did close. get the closed gate Object ID's and do Close, like you did to Open.
Reply
#6

Quote:
Originally Posted by zde5
Посмотреть сообщение
you are using same coordinates for opened, and closed position
pawn Код:
MoveObject(Gate1, 1337.3000488,687.9000244,17.6509991,0.0000000,0.0000000,270.0000000);
and https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Yeah, I know... I have tried changing the Coordinates... But it still doesn't work :P
Reply
#7

Quote:
Originally Posted by |Xenon|Mapper|
Посмотреть сообщение
You only did Open, you never did close. get the closed gate Object ID's and do Close, like you did to Open.
What do you mean? Make another Filterscript but name it Closed? :L (I'm a noob)
Reply
#8

You are missing a cord, In Gate open. Its 980 look at the close, your have to get the first one, then it sould work for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)