[Ajuda] fs
#1

[PHP]
PHP код:
// 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.19999980926500180.25);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
//Portao Da Faculdade 2
    
if (strcmp("/abrirfacul2"cmdtexttrue10) == 0)
    {
            
format(filesizeof(file), PASTA_CONTASGetPlayerNameEx(playerid));
            if(
dini_Int(file"Profissao") == Policial_M || dini_Int(file"Profissao") == C_Diretor || dini_Int(file"aAdmin") == 1)
            {
            
MoveObject(Faculdade2,1081.5999755859, -1704.69995117199.19999980926515.0);
            
SendClientMessage(playeridVerde"Portгo Da Faculdade Aberto! Agora Digite /fecharfacul para fechar");
            return 
1;
    }
 }
//Portao Da Faculdade 2
    
if (strcmp("/fecharfacul2"cmdtexttrue10) == 0)
        {
            
format(filesizeof(file), PASTA_CONTASGetPlayerNameEx(playerid));
            if(
dini_Int(file"Profissao") == Policial_M || dini_Int(file"Profissao") == C_Diretor || dini_Int(file"aAdmin") == 1)
            {
            
MoveObject(Faculdade2,1081.5999755859, -1704.699951171915.1999998092655.0);
            
SendClientMessage(playeridVermelho"Portгo Da Faculdade Fechado Se Quiser Abrir Digite /abrirfacul");
            return 
1;
        }
    }
    return 
0;



Da esses seguintes erros:

Код:
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.

alguem sabe resolver ajude me !
Reply
#2

Vocк nгo prefere um portгo automбtico nгo, se preferir olha este http://pastebin.com/yhkE8pjd
Reply
#3

Vocк esqueceu do "new file[123];"
pawn Код:
#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;
}
Reply
#4

@edit

ok ,vo ver se deu certo aki !
Reply
#5

Quote:
Originally Posted by chefaoBR
Посмотреть сообщение
Й porque й tipo uma segunda faculdade , e eu queria quem pudesse abrir era sу o diretor e o policiais. Ai as pessoas pudessem entrar !
Vou tentar fazer com com o portгo automбtico ai vc olha se achar melhor.
olha ai se vai funconar
pawn Код:
#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
Reply
#6

Quote:
Originally Posted by chefaoBR
Посмотреть сообщение
@edit

ok ,vo ver se deu certo aki !
Tente usar com o portгo automatico, assim vc pode deixar de perder tempo digitando comando ao abrir o portгo
Reply
#7

#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.
#NO AUTIMATICO DEU ESSES SEGUINTES ERROS:

Код:
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.
Reply
#8

Quote:
Originally Posted by chefaoBR
Посмотреть сообщение
#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.
#NO AUTIMATICO DEU ESSES SEGUINTES ERROS:

Код:
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.
Olha ai agora
pawn Код:
#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;
}
Eu nгo uso a include <dini> eu uso a include DOF2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)