I need help with my Gates
#1

Okay so, I posted kind of the same thing yesterday and I never got it working... Can you guys please help me? Please give me the correct code or what ever.

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,12.6000004,0.0000000,0.0000000,270.0000000);
            SendClientMessage(playerid, COLOR_RED, "Gate(1) Closed successfuly !");
            return 1;
        }
    }
    return 0;
}
public OnFilterScriptExit()
{
    return 1;
}
Also I get 6 Warnings-
pawn Код:
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 (c) 1997-2006, ITB CompuPhase


6 Warnings.
Reply
#2

Look up the function syntaxes on the wiki. You've got them completely wrong.
Reply
#3

I fixed up the script for you. It should compile with no errors or warnings. As MP2 already said, you should look up some of the function syntax.

http://pastebin.com/tw4ZSx8P
Reply
#4

Quote:
Originally Posted by JJB562
Посмотреть сообщение
I fixed up the script for you. It should compile with no errors or warnings. As MP2 already said, you should look up some of the function syntax.

http://pastebin.com/tw4ZSx8P
Thanks so much! +Rep!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)