public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == 131072 || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) // Verifica se o jogador pressionou o N
{
// A gente remove o IsPlayerAnyVehicle pois sempre que ele N espaзo irб aparecer a mensagem.
new id = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(id, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET) {
SetVehicleParamsEx(id, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, Branco, "Vocк ligou o seu veнculo!");
}
else
{
SetVehicleParamsEx(id, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
SendClientMessage(playerid, Cinza, "Vocк desligou o seu veнculo!");
}
return true;
}
return 1;
}
if(newkeys == 131072 || GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
if(newkeys == 131072 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
|
vou testar aqui, vocк poderia me explicar a diferenзa entre || e && ?
|
if(numero == 1 || numero == 0) //se numero for igual a 1 OU numero for igual a 0
if(nome == luan && idade == 19) //se nome for igual a luan E idade for igual a 19