// FS CREATE OF BY TC PRODUCTIONS
#include <a_samp>
new Faculdade2;
#define Vermelho 0xFF0000AA
#define Verde 0x33AA33AA
public OnFilterScriptInit()
{
Faculdade2 = CreateObject(980,1081.5999755859,-1704.6999511719,15.199999809265, 0, 0, 180.25);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//Portao Da Faculdade 2
if (strcmp("/abrirfacul2", cmdtext, true, 10) == 0)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == C_Diretor || dini_Int(file, "aAdmin") == 1)
{
MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 9.1999998092651, 5.0);
SendClientMessage(playerid, Verde, "Portгo Da Faculdade Aberto! Agora Digite /fecharfacul para fechar");
return 1;
}
}
//Portao Da Faculdade 2
if (strcmp("/fecharfacul2", cmdtext, true, 10) == 0)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == C_Diretor || dini_Int(file, "aAdmin") == 1)
{
MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 15.199999809265, 5.0);
SendClientMessage(playerid, Vermelho, "Portгo Da Faculdade Fechado Se Quiser Abrir Digite /abrirfacul");
return 1;
}
}
return 0;
}
C:\Users\Osmar\Desktop\FS_Facul2.pwn(22) : error 017: undefined symbol "file" C:\Users\Osmar\Desktop\FS_Facul2.pwn(22) : error 017: undefined symbol "file" C:\Users\Osmar\Desktop\FS_Facul2.pwn(22) : error 029: invalid expression, assumed zero C:\Users\Osmar\Desktop\FS_Facul2.pwn(22) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
#include <a_samp>
new Faculdade2;
#define Vermelho 0xFF0000AA
#define Verde 0x33AA33AA
public OnFilterScriptInit()
{
Faculdade2 = CreateObject(980,1081.5999755859,-1704.6999511719,15.199999809265, 0, 0, 180.25);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//Portao Da Faculdade 2
if (strcmp("/abrirfacul2", cmdtext, true, 10) == 0)
{
new file[123];
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == C_Diretor || dini_Int(file, "aAdmin") == 1)
{
MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 9.1999998092651, 5.0);
SendClientMessage(playerid, Verde, "Portгo Da Faculdade Aberto! Agora Digite /fecharfacul para fechar");
return 1;
}
}
//Portao Da Faculdade 2
if (strcmp("/fecharfacul2", cmdtext, true, 10) == 0)
{
new file[123];
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == C_Diretor || dini_Int(file, "aAdmin") == 1)
{
MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 15.199999809265, 5.0);
SendClientMessage(playerid, Vermelho, "Portгo Da Faculdade Fechado Se Quiser Abrir Digite /abrirfacul");
return 1;
}
}
return 0;
}
Й porque й tipo uma segunda faculdade , e eu queria quem pudesse abrir era sу o diretor e o policiais. Ai as pessoas pudessem entrar !
|
#include <a_samp>
#define PASTA_CONTAS "Conta/%s.ini"
new Faculdade2;
forward CheckGate();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Poratгo Automatico ");
print("--------------------------------------\n");
SetTimer("CheckGate",200,true);
Faculdade2 = CreateObject(980,1081.5999755859,-1704.6999511719,15.199999809265, 0, 0, 180.25);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public CheckGate()
{
new mygate_status;
new file[123];
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
for(new i;i<MAX_PLAYERS;i++)
{
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == C_Diretor || dini_Int(file, "aAdmin") == 1)//Configure aki quem poderar passar doportгo
{
if(!IsPlayerConnected(i)) continue;
//Distancia ||
if(IsPlayerInRangeOfPoint(i, 35, 1081.5999755859, -1704.6999511719, 9.1999998092651))mygate_status=1; //raio em que oportao que ira abrirar
}
if(mygate_status)MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 9.1999998092651, 5.0);//coordenadasdo portгo Aberto
else MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 15.199999809265, 5.0);//coordenadasdo portгo fechado
}
}
#if !defined IsPlayerInRangeOfPoint
stock IsPlayerInRangeOfPoint(playerid, Float:radius, Float:X, Float:Y, Float:Z)
{
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
return ( ( ((px-X)*(px-X))+((py-Y)*(py-Y))+((pz-Z)*(pz-Z)) ) >= radius*radius );
}
#endif
C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(22) : error 017: undefined symbol "PASTA_CONTAS" C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(23) : error 017: undefined symbol "dini_Int" C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(34) : error 017: undefined symbol "PASTA_CONTAS" C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(35) : error 017: undefined symbol "dini_Int" Pawn compiler 3.2.3664 Copyright (coffee) 1997-2006, ITB CompuPhase 4 Errors.
C:\Users\Osmar\Documents\servidor original\filterscripts\FS_Facul2.pwn(27) : error 017: undefined symbol "GetPlayerNameEx" C:\Users\Osmar\Documents\servidor original\filterscripts\FS_Facul2.pwn(30) : error 017: undefined symbol "dini_Int" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
#NO QUE EU MANDEI DEU ESSES SEGUINTES ERROS:
Код:
C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(22) : error 017: undefined symbol "PASTA_CONTAS" C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(23) : error 017: undefined symbol "dini_Int" C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(34) : error 017: undefined symbol "PASTA_CONTAS" C:\Users\JuniorProduзхes\Desktop\FS_Facul2.pwn(35) : error 017: undefined symbol "dini_Int" Pawn compiler 3.2.3664 Copyright (coffee) 1997-2006, ITB CompuPhase 4 Errors. Код:
C:\Users\Osmar\Documents\servidor original\filterscripts\FS_Facul2.pwn(27) : error 017: undefined symbol "GetPlayerNameEx" C:\Users\Osmar\Documents\servidor original\filterscripts\FS_Facul2.pwn(30) : error 017: undefined symbol "dini_Int" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
#include <a_samp>
#include <dini>
#define PASTA_CONTAS "/Contas/%s.ini"
new Faculdade2;
forward CheckGate();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Poratгo Automatico ");
print("--------------------------------------\n");
SetTimer("CheckGate",200,true);
Faculdade2 = CreateObject(980,1081.5999755859,-1704.6999511719,15.199999809265, 0, 0, 180.25);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public CheckGate()
{
new mygate_status; new file[123];
for(new i;i<MAX_PLAYERS;i++)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(i));
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == C_Diretor || dini_Int(file, "aAdmin") == 1)//Configure aki quem poderar passar doportгo
{
if(!IsPlayerConnected(i)) continue;
//Distancia ||
if(IsPlayerInRangeOfPoint(i, 35, 1081.5999755859, -1704.6999511719, 9.1999998092651))mygate_status=1; //raio em que oportao que ira abrirar
}
if(mygate_status)MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 9.1999998092651, 5.0);//coordenadasdo portгo Aberto
else MoveObject(Faculdade2,1081.5999755859, -1704.6999511719, 15.199999809265, 5.0);//coordenadasdo portгo fechado
}
}
#if !defined IsPlayerInRangeOfPoint
stock IsPlayerInRangeOfPoint(playerid, Float:radius, Float:X, Float:Y, Float:Z)
{
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
return ( ( ((px-X)*(px-X))+((py-Y)*(py-Y))+((pz-Z)*(pz-Z)) ) >= radius*radius );
}
#endif
stock GetPlayerNameEx(playerid)
{
new PlayerNameLevel[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerNameLevel, MAX_PLAYER_NAME);
return PlayerNameLevel;
}