[HELP] With gate ?
#1

I know to create a gate to can open all with command but i want to create a gate who will can open only by police
i copy this from script and i need help. And i want to put this in FilterScript.


Cordinates:


CreateObject(980,719.97039795,-1415.19812012,15.30977249,0.00000000,0.00000000,0. 00000000); //Door OPEN
CreateObject(980,707.49176025,-1415.93664551,15.30977249,0.00000000,0.00000000,0. 00000000); //Door CLOSE

So where i need to put this cordinates?
Please help!

Код:
if(!strcmp(cmdtext, "/vo", true))
{
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
    {
        if (PlayerToPoint(15, playerid,245.0578,72.4314,1002.5406))
		{
      		MoveObject(pdbrod, 244.0578,72.4314,1002.5406, 3.5);
      		SetTimer("GateClose15", 12000, 0);
      		SendClientMessage(playerid, COLOR_BLUE,"Vratata e otvorena i se zatvara za 7 sekundi.");
      		GetPlayerName(playerid, sendername, sizeof(sendername));
      		format(string, sizeof(string), "* %s ja otvori vratata na PD.", sendername);
      		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	    }
	    else { SendClientMessage(playerid, COLOR_GREY,"Ne si blizu do vratata."); }
	}
 	else return SendClientMessage(playerid, COLOR_GREY,"Nemas prava.");
    return 1;
}
Код:
public GateClose15(playerid)
{
      MoveObject(pdbrod, 719.97039795,-1415.19812012,15.30977249, 3.5);
      return 1;
}
Reply
#2

pawn Код:
CreateObject(980,719.97039795,-1415.19812012,15.30977249,0.00000000,0.00000000,0. 00000000); //Door OPEN
                      X                  Y          Z
CreateObject(980,707.49176025,-1415.93664551,15.30977249,0.00000000,0.00000000,0. 00000000); //Door CLOSE
                      X                   Y         Z
pawn Код:
if(!strcmp(cmdtext, "/vo", true))
{
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
    {
        if (PlayerToPoint(15, playerid,245.0578,72.4314,1002.5406))
        {
            MoveObject(pdbrod, 719.97039795,-1415.19812012,15.30977249, 3.5);
            SetTimer("GateClose15", 12000, 0);
            SendClientMessage(playerid, COLOR_BLUE,"Vratata e otvorena i se zatvara za 7 sekundi.");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s ja otvori vratata na PD.", sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        else { SendClientMessage(playerid, COLOR_GREY,"Ne si blizu do vratata."); }
    }
    else return SendClientMessage(playerid, COLOR_GREY,"Nemas prava.");
    return 1;
}
pawn Код:
public GateClose15(playerid)
{
      MoveObject(pdbrod, 707.49176025,-1415.93664551,15.30977249, 3.5);
      return 1;
}
Reply
#3

Yes man thanks but a little problem
if (PlayerToPoint(15, playerid,245.0578,72.4314,1002.5406)) ? what is this what to put here.

And i want to add this in FilterScript.
Reply
#4

Quote:
Originally Posted by GBLTeam
Посмотреть сообщение
Yes man thanks but a little problem
if (PlayerToPoint(15, playerid,245.0578,72.4314,1002.5406)) ? what is this what to put here.

And i want to add this in FilterScript.
Nothing, the brace is at the line under.
Reply
#5

Quote:
Originally Posted by cynic
Посмотреть сообщение
Nothing, the brace is at the line under.
Yes but can you give me full from filtescript because i want this to be in FS not in GM.
Reply
#6

Is complicated, you will need read the variables from playerfile or use CallRemoteFunction to set this variables of God Father in the filterscript.
Reply
#7

Quote:
Originally Posted by cynic
Посмотреть сообщение
Is complicated, you will need read the variables from playerfile or use CallRemoteFunction to set this variables of God Father in the filterscript.
How can you tell me?


Look i add in gm


Код:
C:\Documents and Settings\mbs\Desktop\Test\CS.pwn(10333) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10335) : error 017: undefined symbol "playerid"
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10337) : error 017: undefined symbol "playerid"
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10341) : error 017: undefined symbol "playerid"
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10342) : error 017: undefined symbol "playerid"
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10342) : error 017: undefined symbol "sendername"
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10342) : error 029: invalid expression, assumed zero
C:\Documents and Settings\X\Desktop\Test\CS.pwn(10342) : fatal error 107: too many error messages on one line
Reply
#8

Anyone to help me?
Reply
#9

On the top put it: #include <a_samp>
And add the enums and the variable PlayerInfo[MAX_PLAYERS][pInfo] at your filterscript.
Then, do reading or by CallRemoteFunction to get the values of the player variables.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)