[Ajuda] Carro quebrado
#1

Quando chega a 400 de vida o carro quebra, mais o sistema ta dando os seguintes erros na minha gm.

PHP код:
C:\Users\Sheriff\Desktop\SP Virtual\pawno\include\streamer.inc(333) : warning 201redefinition of constant/macro (symbol "OnGameModeInit")
C:\Users\Sheriff\Desktop\SP Virtual\gamemodes\MundoNovo.pwn(1006) : error 017undefined symbol "sendername"
C:\Users\Sheriff\Desktop\SP Virtual\gamemodes\MundoNovo.pwn(1006) : error 017undefined symbol "sendername"
C:\Users\Sheriff\Desktop\SP Virtual\gamemodes\MundoNovo.pwn(1006) : error 029invalid expressionassumed zero
C
:\Users\Sheriff\Desktop\SP Virtual\gamemodes\MundoNovo.pwn(1006) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Код:
forward CheckCarHealth();

public CheckCarHealth()
{
new string[256];
for (new i=0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
new Float:health;
GetVehicleHealth(GetPlayerVehicleID(i),health);
        new carro = GetPlayerVehicleID(i);
new mot, lu, alar, por, cap, porma, ob;
if(health <= 400)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(i, 1);
SendClientMessage(i, COLOR_LIGHTBLUE, "Seu veiculo quebrou, tente ligar novamente ou ligue para um mecanico!");
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "* O veiculo de %s quebrou.", sendername);
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
}
}
}
}
}
Oque esta de errado?
Reply
#2

PHP код:
forward CheckCarHealth();
public 
CheckCarHealth()
{
    new 
string[256];
    for (new 
i=0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            new 
sendername[MAX_PLAYER_NAME];
            new 
Float:health;
            
GetVehicleHealth(GetPlayerVehicleID(i),health);
            new 
carro GetPlayerVehicleID(i);
            new 
motlualarporcappormaob;
            if(
health <= 400)
            {
                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)
                {
                    
TogglePlayerControllable(i1);
                    
SendClientMessage(iCOLOR_LIGHTBLUE"Seu veiculo quebrou, tente ligar novamente ou ligue para um mecanico!");
                    
GetPlayerName(isendernamesizeof(sendername));
                    
format(stringsizeof(string), "* O veiculo de %s quebrou."sendername);
                    
ProxDetector(30.0istringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
GetVehicleParamsEx(carromotlualarporcappormaob);
                    
SetVehicleParamsEx(carroVEHICLE_PARAMS_OFFlualarporcappormaob);
                }
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)