if (newkeys & KEY_YES)//Erro aki
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(lights == 0)
{
SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
}
else
{
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
}
}
else
SendClientMessage(playerid, 0x00FF00FF, "Voce nгo й o motorista do veнculo.");
}
else
SendClientMessage(playerid, 0x00FF00FF, "Voce nгo estб em um veнculo");
}
Linha: 1181
Tipo: Erro 017
Explicaзгo: undefined symbol "KEY_YES"
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_YES) && !(oldkeys & KEY_YES))
{
new vehicleid, engine,lights,alarm,doors,bonnet,boot,objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if (vehicleid != 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(lights == 0)
{
SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
}
else
SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
}
}
}
return 1;
}
new veiculoid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
if ((newkeys & KEY_YES) && !(oldkeys & KEY_YES) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if (IsPlayerInAnyVehicle(playerid))
{
if(lights == VEHICLE_PARAMS_OFF)
{
SetVehicleParamsEx(veiculoid, engine, VEHICLE_PARAMS_ON, false, doors, bonnet, boot, objective);
GameTextForPlayer(playerid, "~w~farois ~b~~h~ligados~w~.", 1000, 5);
}
else
if(lights == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(veiculoid, engine, VEHICLE_PARAMS_OFF, false, doors, bonnet, boot, objective);
GameTextForPlayer(playerid, "~w~farois ~r~desligados~w~.", 1000, 5);
}
}
}
PHP код:
|
PlayerInfo[playerid][Logado] == true)
Ae й so trocar, exemplo:
PHP код:
|
Coloque na OnPlayerKeyStateChange
PHP код:
|
PHP код:
|
#if defined KEY_YES
#undef
#endif
#define KEY_YES (65536)
H:\CargaPesada\gamemodes\PT_CP.pwn(1183) : error 017: undefined symbol "KEY_YES"
#if defined KEY_YES
#undef
#endif
#define KEY_YES 65536
Pois bem, em meu GM ainda continua o erro, testei todos os que vocкs postaram.
Erro: PHP код:
Abraзos. |