24.07.2010, 04:15
olб estou tentando colocar no meu GM para o caro parar antes de explodir, para que os mecanicos consertem-o
parei aqui:
forward CheckCarHealth();
public CheckCarHealth()
{
new string[256];
new sendername[MAX_PLAYER_NAME];
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);
if(health <= 400)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(i, 0);
SendClientMessage(i, COLOR_LIGHTBLUE, "Seu veiculo quebrou, tente ligar novamente ou ligue para um mecanico! (/sair para sair do veiculo)");
engineOn[GetPlayerVehicleID(i)] = false;
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_PURPL E,COLOR_PURPLE);
}
}
}
}
}
POREM deu este erro:
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error: 017: undefined symbol "engineOn"
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error: 001: expected token: ";", but found "]"
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error: 029: invalid expression, assumed zero
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error fatal: 107: too many error messages on one line
parei aqui:
forward CheckCarHealth();
public CheckCarHealth()
{
new string[256];
new sendername[MAX_PLAYER_NAME];
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);
if(health <= 400)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(i, 0);
SendClientMessage(i, COLOR_LIGHTBLUE, "Seu veiculo quebrou, tente ligar novamente ou ligue para um mecanico! (/sair para sair do veiculo)");
engineOn[GetPlayerVehicleID(i)] = false;
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_PURPL E,COLOR_PURPLE);
}
}
}
}
}
POREM deu este erro:
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error: 017: undefined symbol "engineOn"
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error: 001: expected token: ";", but found "]"
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error: 029: invalid expression, assumed zero
D:\Arquivos - Formatando\Sa-Mp\gamemodes\tlb.pwn(28387) : error fatal: 107: too many error messages on one line