10/04/2024 12:07
sou novo no pawno e queria uma ajuda pois não estou conseguindo localizar o erro, o meu sistema de ligar motor e farol não está indo, o farol não acende e o motor quando entro no carro ja está ligado, ele até desliga e liga normalmente, porem quando entro no carro ja está ligado...
a gm compila normalmente!!!
codigo >>>>
Luz(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
return luzes;
}
LMotor(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
return motor;
}
>>>>>
LigarM(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, 1, luzes, alarmev, portas, capo, mala, objective);
}
DesligarM(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, 0, luzes, alarmev, portas, capo, mala, objective);
}
LigarLuz(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, motor, 1, alarmev, portas, capo, mala, objective);
}
DesligarLuz(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, motor, 0, alarmev, portas, capo, mala, objective);
}
>>>>>>>>>>>>>>>>>>>
if(newkeys & KEY_YES){
if(IsPlayerInAnyVehicle(playerid)){
if(Luz(playerid) == 0){
if(!(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)) {
}else{
LigarLuz(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Luzes ligada");
}
}else{
DesligarLuz(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Luzes desligada");
}
}
}
if(newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid)){
if(IsPlayerInAnyVehicle(playerid)){
if(LMotor(playerid) == 0){
if(!(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)) {
}else{
LigarM(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Veiculo Ligado");
}
}else{
DesligarM(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Veiculo Desligado");
}
}
}
return 1;
}
a gm compila normalmente!!!
codigo >>>>
Luz(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
return luzes;
}
LMotor(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
return motor;
}
>>>>>
LigarM(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, 1, luzes, alarmev, portas, capo, mala, objective);
}
DesligarM(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, 0, luzes, alarmev, portas, capo, mala, objective);
}
LigarLuz(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, motor, 1, alarmev, portas, capo, mala, objective);
}
DesligarLuz(playerid){
new velid = GetPlayerVehicleID(playerid);
new motor, luzes, alarmev, portas, capo, mala, objective;
GetVehicleParamsEx(velid, motor, luzes, alarmev, portas, capo, mala, objective);
SetVehicleParamsEx(velid, motor, 0, alarmev, portas, capo, mala, objective);
}
>>>>>>>>>>>>>>>>>>>
if(newkeys & KEY_YES){
if(IsPlayerInAnyVehicle(playerid)){
if(Luz(playerid) == 0){
if(!(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)) {
}else{
LigarLuz(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Luzes ligada");
}
}else{
DesligarLuz(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Luzes desligada");
}
}
}
if(newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid)){
if(IsPlayerInAnyVehicle(playerid)){
if(LMotor(playerid) == 0){
if(!(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)) {
}else{
LigarM(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Veiculo Ligado");
}
}else{
DesligarM(playerid);
//SendClientMessage(playerid,Branco,"{7C35CA}| INFO | Veiculo Desligado");
}
}
}
return 1;
}