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
#2

Try using ZCMD, it will work perfectly and have you
Quote:

#define FILTERSCRIPT

?
Reply
#3

simple error i saw right awah
Код:
if(IsPlayerInRangeOfPoint(playerid, -2534.4148,3141.7007,1.2366,357.2968))
//read before contining
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


open gate
PHP код:
if(IsPlayerInRangeOfPoint(playerid7.0, -2534.4148,3141.7007,1.2366,357.2968)) 
PHP код:
0,0,0 is in the middle of the map that means u must be in the middle of the map to close it

if(IsPlayerInRangeOfPoint(playerid15.0, -2534.4148,3141.7007,1.2366,357.2968)) 
Reply
#4

I did as yew said .. !! I got 2 warnings..

PHP код:
C:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1974) : warning 202number of arguments does not match definition
C
:\Documents and Settings\User\Desktop\SATDM\filterscripts\TheBossHouse.pwn(1985) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Warnings

here is what i did ...
PHP код:
if(IsPlayerInRangeOfPoint(playerid,7.0, -2534.4148,3141.7007,1.2366,357.2968))
        { 
Reply
#5

then you did do what i said copy and paste what i have above u have more argument lmfao
you put x,y,z and some other cordinate watch mines and watch yours u didnt do what i told u
(playerid,distance,x,y,z)
Reply
#6

mm..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)