// LSPD Gate Mapped by 12kelvin12 and scripted by Tom.1412
// Don't remove credits or claim it as yours.
#include <a_samp>
#include <streamer>
#define FILTERSCRIPT
#define Message 0xFFFFFFAA
new lspdgate1;
new lspdgate2;
forward GateClose0(playerid);
forward PDEXIT2(playerid);
forward PDEXIT3(playerid);
forward loadobjects();
public OnFilterScriptInit()
{
loadobjects();
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public loadobjects()
{
print("\n--------------------------------------");
print(" LOL ");
print("--------------------------------------\n");
lspdgate1 = CreateObject(988, 1539.6418457031, -1630.5640869141, 12, 0, 0, 270);
lspdgate2 = CreateObject(988, 1539.6505126953, -1625.1252441406, 12, 0, 0, 270);
CreateObject(988, 1539.64, -1630.56, 12.00, 0.00, 0.00, 270.00);
CreateObject(988, 1539.65, -1625.13, 12.00, 0.00, 0.00, 270.00);
CreateObject(987, 1539.64, -1605.85, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.67, -1602.37, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1551.62, -1602.35, 12.45, 0.00, 0.00, 180.62);
CreateObject(987, 1563.53, -1602.30, 12.45, 0.00, 0.00, 180.62);
CreateObject(987, 1575.55, -1602.38, 12.45, 0.00, 0.00, 179.62);
CreateObject(987, 1587.46, -1602.35, 12.45, 0.00, 0.00, 180.09);
CreateObject(987, 1599.42, -1602.31, 12.45, 0.00, 0.00, 180.34);
CreateObject(987, 1608.04, -1602.35, 12.45, 0.00, 0.00, 180.09);
CreateObject(987, 1607.93, -1614.21, 12.45, 0.00, 0.00, 89.76);
CreateObject(987, 1607.95, -1626.13, 12.45, 0.00, 0.00, 89.76);
CreateObject(987, 1607.94, -1638.01, 12.45, 0.00, 0.00, 89.76);
CreateObject(987, 1596.01, -1638.84, 12.45, 0.00, 0.00, 4.11);
CreateObject(970, 1551.56, -1617.62, 13.10, 0.00, 0.00, 0.00);
CreateObject(970, 1559.90, -1617.63, 13.10, 0.00, 0.00, 0.00);
CreateObject(970, 1564.02, -1617.65, 13.10, 0.00, 0.00, 0.00);
CreateObject(970, 1568.04, -1617.64, 13.10, 0.00, 0.00, 0.00);
CreateObject(970, 1572.17, -1617.65, 13.10, 0.00, 0.00, 0.00);
CreateObject(970, 1575.64, -1617.66, 13.10, 0.00, 0.00, 0.00);
CreateObject(3934, 1565.68, -1645.19, 27.40, 0.00, 0.00, 359.22);
CreateObject(970, 1555.74, -1617.63, 13.10, 0.00, 0.00, 0.00);
CreateObject(987, 1539.35, -1645.23, 12.45, 0.00, 0.00, 356.74);
CreateObject(987, 1539.44, -1633.30, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.81, -1610.50, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.44, -1633.30, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.44, -1633.30, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.44, -1633.30, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.44, -1633.30, 12.45, 0.00, 0.00, 269.92);
CreateObject(987, 1539.44, -1633.30, 12.45, 0.00, 0.00, 269.92);
return 1;
}
public GateClose0(playerid)
{
MoveObject(lspdgate1, 1539.6418457031, -1630.5640869141, 12, 2);
MoveObject(lspdgate2, 1539.6505126953, -1625.1252441406, 12, 2);
SetTimer("GateClose02", 3400, 0);
return 1;
}
public PDEXIT2(playerid)
{
MoveObject(lspdgate1, 1539.6505126953, -1634.3499755859, 12, 2);
MoveObject(lspdgate2, 1539.6505126953, -1621, 12, 2);
SetTimer("PDEXIT3", 3400, 0);
return 1;
}
public PDEXIT3()
{
MoveObject(lspdgate1, 1539.6418457031, -1630.5640869141, 12, 2);
MoveObject(lspdgate2, 1539.6505126953, -1625.1252441406, 12, 2);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/gateopen", true))
{
MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
SetTimer("GateClose0", 3400, 0);
}
else
{
SendClientMessage(playerid, Message,"You are not a Police Officer");
}
return 1;
}
if(IsACop(playerid) && PlayerInfo[playerid][pRank] >= 7 || IsSpecial(playerid) || PlayerInfo[playerid][pAdmin] >= 5
|
Код:
if(!strcmp(cmdtext, "/gateopen", true))
{
MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
SetTimer("GateClose0", 3400, 0);
}
else
{
SendClientMessage(playerid, Message,"You are not a Police Officer");
}
return 1;
}
|
if(!strcmp(cmdtext, "/gateopen", true))
{
if(PlayerInfo[playerid][pAdmin] >= 4 || IsAPDMember(playerid) || IsAFreecop(playerid))
{
//if (IsPlayerInRangeOfPoint(playerid, 15,1589.053344,-1638.123168,14.122960))
{
MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
SetTimer("GateClose0", 3400, 0);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You are not a police officer!");
return 1;
}
}
#include <a_samp>
#define FILTERSCRIPT
new yamaguchigates1;
public OnFilterScriptInit()
{
yamaguchigates1 = CreateObject(980, 785.09997558594, -1152.4000244141, 25.299999237061, 0, 0, 270, 100.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/go", true)){
if(IsPlayerInRangeOfPoint(playerid, 15, 785.09997558594, -1152.4000244141, 25.299999237061)){
MoveObject(yamaguchigates1, 785.40002441406, -1162.9000244141, 25.39999961853, 3.0, 0.0, 0.0, 270);
return 1;
}
}
else if(strcmp(cmdtext, "/close", true)){
if(IsPlayerInRangeOfPoint(playerid, 15, 785.09997558594, -1152.4000244141, 25.299999237061)){
MoveObject(yamaguchigates1, 785.09997558594, -1152.4000244141, 25.299999237061, 3.0, 0.0, 0.0, 270);
return 1;
}
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}
C:\Users\matthew\Desktop\CnR1.1\filterscripts\LSPD_Gate.pwn(94) : error 017: undefined symbol "PlayerInfo" C:\Users\matthew\Desktop\CnR1.1\filterscripts\LSPD_Gate.pwn(94) : warning 215: expression has no effect C:\Users\matthew\Desktop\CnR1.1\filterscripts\LSPD_Gate.pwn(94) : error 001: expected token: ";", but found "]" C:\Users\matthew\Desktop\CnR1.1\filterscripts\LSPD_Gate.pwn(94) : error 029: invalid expression, assumed zero C:\Users\matthew\Desktop\CnR1.1\filterscripts\LSPD_Gate.pwn(94) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
C:\Users\matthew\Desktop\CnR1.1\gamemodes\larp.pwn(52084) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if(!strcmp(cmdtext, "/gateopen", true))
{
if(PlayerInfo[playerid][pAdmin] >= 4 || IsAPDMember(playerid) || IsAFreecop(playerid))
{
//if (IsPlayerInRangeOfPoint(playerid, 15,1589.053344,-1638.123168,14.122960))
{
MoveObject(lspdgate1, 1539.6418457031, -1634.3499755859, 12, 2);
MoveObject(lspdgate2, 1539.6418457031, -1621, 12, 2);
SetTimer("GateClose0", 3400, 0);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You are not a police officer!");
}
return 1;
}
}
|
Down to 1 error, How would I fix this, It's to do with the 'else'. Line 52084
Код:
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You are not a police officer!");
return 1;
}
}
|
|
Hey man, i too cant understand that gates system, i am tryed a lot of them xD Ramiraz can u show me How i can open gates only if i am in Yamaguchi faction?
Here is FS Code, it works, but...for all players. Код:
#include <a_samp>
#define FILTERSCRIPT
new yamaguchigates1;
public OnFilterScriptInit()
{
yamaguchigates1 = CreateObject(980, 785.09997558594, -1152.4000244141, 25.299999237061, 0, 0, 270, 100.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/go", true)){
if(IsPlayerInRangeOfPoint(playerid, 15, 785.09997558594, -1152.4000244141, 25.299999237061)){
MoveObject(yamaguchigates1, 785.40002441406, -1162.9000244141, 25.39999961853, 3.0, 0.0, 0.0, 270);
return 1;
}
}
else if(strcmp(cmdtext, "/close", true)){
if(IsPlayerInRangeOfPoint(playerid, 15, 785.09997558594, -1152.4000244141, 25.299999237061)){
MoveObject(yamaguchigates1, 785.09997558594, -1152.4000244141, 25.299999237061, 3.0, 0.0, 0.0, 270);
return 1;
}
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}
|
error 017: undefined symbol "IsPlayerAYamaguchiMember" error 017: undefined symbol "IsPlayerAYamaguchiMember"
#include <a_samp>
#include <a_players>
#define YamaguchiMember
#define FILTERSCRIPT
new yamaguchigates1;
public OnFilterScriptInit()
{
print("\n******************************************************");
print("* *");
print("* Simple Movable Gates Filterscript *");
print("* *");
print("******************************************************\n");
yamaguchigates1 = CreateObject(980, 785.09997558594, -1152.4000244141, 25.299999237061, 0, 0, 270, 100.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/go", true)){
if(IsPlayerAYamaguchiMember(playerid))
if(IsPlayerInRangeOfPoint(playerid, 15, 785.09997558594, -1152.4000244141, 25.299999237061)){
MoveObject(yamaguchigates1, 785.40002441406, -1162.9000244141, 25.39999961853, 3.0, 0.0, 0.0, 270);
return 1;
}
}
else if(strcmp(cmdtext, "/close", true)){
if(IsPlayerAYamaguchiMember(playerid))
if(IsPlayerInRangeOfPoint(playerid, 15, 785.09997558594, -1152.4000244141, 25.299999237061)){
MoveObject(yamaguchigates1, 785.09997558594, -1152.4000244141, 25.299999237061, 3.0, 0.0, 0.0, 270);
return 1;
}
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}
public IsAYamaguchiMember(playerid)
{
if(IsPlayerConnected(playerid))
{
new leader = PlayerInfo[playerid][pLeader];
new member = PlayerInfo[playerid][pMember];
if(member==1)
{
return 1;
}
else if(leader==1)
{
return 1;
}
}
return 0;
}