[Ajuda] Ajuda com junkBuster
#1

Boa tarde, sou novato, e estou a tentar aprender pawn, estava adaptar um FS no meu Gamemode, porйm obtive estes erros

PHP код:
C:\Users\FlбvioJ\Desktop\sv rp\gamemodes\RP.pwn(82228) : error 021symbol already defined"JB_OnGameModeInit"
C:\Users\FlбvioJ\Desktop\sv rp\gamemodes\RP.pwn(82248) : error 021symbol already defined"JB_OnPlayerCommandText"
C:\Users\FlбvioJ\Desktop\sv rp\gamemodes\RP.pwn(82298) : error 021symbol already defined"JB_OnPlayerStateChange"
C:\Users\FlбvioJ\Desktop\sv rp\gamemodes\RP.pwn(82334) : error 021symbol already defined"OnPlayerExitVehicle" 
PHP код:
#include <JunkBuster>
#define COR_CINZA 0xBFC0C2FF
#define tabsize 0
new AlugarCarro[MAX_PLAYERS];
forward CarroDestrancado(carid);
forward Respawndocarro(playerid);
forward Carrosparaalugar(carid);
public 
OnGameModeInit()
{
        print(
"\n--------------------------------------");
        print(
" Sistema de aluguel de carros by DJLoko ");
        print(
"------------<[Carregado]>-------------\n");
        
AddStaticVehicleEx(562,2160.0573730469,1799.5623779297,10.8203125,0,-1,-1,30000);// Veiculoalguel 1
        
AddStaticVehicleEx(562,2168.0100097656,1799.7695312500,10.8203125,0,-1,-1,30000);// Veiculoalguel 2
        
AddStaticVehicleEx(562,2175.5317382813,1799.8051757813,10.8203125,0,-1,-1,30000);// Veiculoalguel 3
        
AddStaticVehicleEx(562,2183.4045410156,1799.8276367188,10.8203125,0,-1,-1,30000);// Veiculoalguel 4
        
AddStaticVehicleEx(562,2191.1486816406,1799.7927246094,10.8203125,0,-1,-1,30000);// Veiculoalguel 5
        
AddStaticVehicleEx(562,2198.4870605469,1799.7885742188,10.8203125,0,-1,-1,30000);// Veiculoalguel 6
        
AddStaticVehicleEx(562,2198.6010742188,1810.0036621094,10.8203125,0,-1,-1,30000);// Veiculoalguel 7
        
AddStaticVehicleEx(562,2191.0888671875,1810.1614990234,10.8203125,0,-1,-1,30000);// Veiculoalguel 8
        
AddStaticVehicleEx(562,2183.3344726563,1810.1407470703,10.8203125,0,-1,-1,30000);// Veiculoalguel 9
        
AddStaticVehicleEx(562,2175.3098144531,1810.1428222656,10.8203125,0,-1,-1,30000);// Veiculoalguel 10
        
AddStaticVehicleEx(562,2167.7849121094,1810.1483154297,10.8203125,0,-1,-1,30000);// Veiculoalguel 11
        
AddStaticVehicleEx(562,2160.4975585938,1810.2126464844,10.8203125,0,-1,-1,30000);// Veiculoalguel 12
        
return 1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
        new 
CarroTrancado[265];
        if(
strcmp("/alugarveiculo"cmdtexttrue10) == 0)
        {
                if(
IsPlayerConnected(playerid))
                {
                        new 
carid GetPlayerVehicleID(playerid);
                        if(
Carrosparaalugar(carid))
                        {
                                if (
GetPlayerMoney(playerid) <  1000)
                                {
                                        
SendClientMessage(playeridCOR_CINZA"Vocк nгo tem dinheiro soficiente!");
                                        return 
1;
                                }
                                
AlugarCarro[playerid] = GetPlayerVehicleID(playerid);
                                
GivePlayerMoney(playerid,-1000);
                                
PlayerPlaySound(playerid10520.00.00.0);
                                
TogglePlayerControllable(playerid1);
                                
GameTextForPlayer(playerid"~w~Nao se esqueca ~b~/deslugarveiculo~n~ ~w~para desalugar seu veiculo"50003);
                        }
                }
                return 
1;
        }
        if(
strcmp("/sair"cmdtexttrue10) == 0)
        {
                
TogglePlayerControllable(playerid1);
                
RemovePlayerFromVehicle(playerid);
                return 
1;
        }
        if(
strcmp("/desalugarveiculo"cmdtexttrue10) == 0)
        {
                if(
IsPlayerConnected(playerid))
                {
                        if(
AlugarCarro[playerid] != 299)
                        {
                                
SetTimer("Respawndocarro"20000);
                                
RemovePlayerFromVehicle(playerid);
                                
TogglePlayerControllable(playerid1);
                                
CarroTrancado[AlugarCarro[playerid]] = 0;
                                
CarroDestrancado(AlugarCarro[playerid]);
                                
AlugarCarro[playerid] = 299;
                                
GameTextForPlayer(playerid"~w~Voce agora nao tem nenhum veiculo alugado"50003);
                        }
                }
                return 
1;
        }
        return 
0;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
        new 
ultimocarro[301];
        new 
novocarro GetPlayerVehicleID(playerid);
        new 
carid GetPlayerVehicleID(playerid);
        if(
Carrosparaalugar(carid))
        {
                if (
AlugarCarro[playerid] != novocarro)
                {
                        
TogglePlayerControllable(playerid0);
                        
GameTextForPlayer(playerid,"~w~Voce pode alugar essa veiculo~n~Cost:~g~$1000~n~~w~Para alugar digite ~g~/alugarveiculo~w~~n~para sair use ~r~/sair"50003);
                }
                
ultimocarro[playerid] = novocarro;
        }
        return 
1;
}
public 
CarroDestrancado(carid)
{
        for(new 
0MAX_PLAYERSi++)
        {
                if(
IsPlayerConnected(i))
                {
                        
SetVehicleParamsForPlayer(carid,i,0,0);
                }
        }
}
public 
Respawndocarro(playerid)
{
        new 
playerid;
        
SetVehicleToRespawn(AlugarCarro[i]);
        
TogglePlayerControllable(i1);
        return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
        new 
playerid;
        
TogglePlayerControllable(i1);
        return 
1;
}
public 
Carrosparaalugar(carid)
{
        if(
carid == || carid == 12)
        {
                return 
1;
        }
        return 
0;

Gostaria de saber como resolver a situaзгo
Reply
#2

Esse JB nao й do aluguel nao em man. ..
Reply
#3

Vocк jб definiu isso ai que estб dando erro antes..

Atenciosamente,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)