Gate adding problem
#1

Hey Guys.. !!

I need to make a gate and added the following commands.. !

pawn Код:
#include <a_samp>
new gate1;
new gate2;
new gate3;
new gate4;
new gate5;
Under

pawn Код:
public OnFilterScriptInit()
{
Added this

pawn Код:
gate1 = CreateObject(975, -2531.17, 3195.20, 2.17,   0.00, 0.00, 0.51);
    gate2 = CreateObject(975, -2552.60, 3194.95, 2.06,   0.00, 0.00, 0.51);
    gate3 = CreateObject(975, -2541.06, 3195.32, 2.06,   0.00, 0.00, 0.51);
    gate4 = CreateObject(975, -2532.44, 3195.32, 2.17,   0.00, 0.00, 0.51);
    gate5 = CreateObject(975, -2549.66, 3195.20, 2.06,   0.00, 0.00, 0.51);
    return 1;
}
Then i added the commands

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/openag", true)){
        if(IsPlayerInRangeOfPoint(playerid, -2534.4148,3141.7007,1.2366,357.2968))
        {
            MoveObject(gate1,-2552.60, 3194.95, -1.13,   0.00, 0.00, 0.51);
            MoveObject(gate2,-2531.17, 3195.20, -1.20,   0.00, 0.00, 0.51);
            MoveObject(gate3,-2541.06, 3195.32, -1.43,   0.00, 0.00, 0.51);
            MoveObject(gate4,-2532.44, 3195.32, -1.20,   0.00, 0.00, 0.51);
            MoveObject(gate5,-2549.66, 3195.20, -1.21,   0.00, 0.00, 0.51);
            return 1;
        }
    }
    else if(strcmp(cmdtext, "/closeag", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 0, 0, 0)){
            MoveObject(gate1, 975, -2531.17, 3195.20, 2.17,   0.00, 0.00, 0.51);
            MoveObject(gate2,975, -2552.60, 3194.95, 2.06,   0.00, 0.00, 0.51);
            MoveObject(gate3,975, -2541.06, 3195.32, 2.06,   0.00, 0.00, 0.51);
            MoveObject(gate4,975, -2532.44, 3195.32, 2.17,   0.00, 0.00, 0.51);
            MoveObject(gate5,975, -2549.66, 3195.20, 2.06,   0.00, 0.00, 0.51);
            return 1;
        }
    }
    return 0;
}
But Still i cant see the gate or the commands.. !!
Reply


Messages In This Thread
Gate adding problem - by Pokiri_Boii - 24.10.2012, 04:49
Re: Gate adding problem - by verlaj - 24.10.2012, 05:10
Re: Gate adding problem - by Glad2BeHere - 24.10.2012, 05:30
Re: Gate adding problem - by Pokiri_Boii - 24.10.2012, 05:34
Re: Gate adding problem - by Glad2BeHere - 24.10.2012, 05:43
Re: Gate adding problem - by Pokiri_Boii - 24.10.2012, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)