Sistema de Sirenes 0.3e AJUDA! -
tigasfilipinos - 06.09.2012
Boas pessoal, estou aqui com um problema no novo sistema de sirenes da 0.3e.
Tipo eu faзo o comando e aparece a sirene no carro desejado, sу que depois eu faзo o comando novamente e nгo remove a sirene do carro, alguйm pode ajudar-me? +rep pa quem ajudar ae
Код:
if (strcmp("/sirenepsp2", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][Faction] != 255 && DynamicFactions[PlayerInfo[playerid][Faction]][fType] == 1)
{
if(DynamicFactions[DynamicCars[GetPlayerVehicleID(playerid)-1][FactionCar]][fType] == 1)
{
new car = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(car);
if(model != 497 && model != 528 && model != 427 && model != 601 && model != 599 && model != 598 && model != 597 && model != 596 && model != 523)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(Police[car][Use] == false)
{
Police[car][Use] = true;
new sirenes = CreateObject(19419, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(sirenes, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
return 1;
}
if(Police[car][Use] == true)
{
Police[car][Use] = false;
AttachObjectToVehicle(sirenes, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
DestroyObject(sirenes);
return 1;
}
}
}
}
return 1;
}
return 1;
}
return 1;
}
Re: Sistema de Sirenes 0.3e AJUDA! -
arakuta - 07.09.2012
Troca o segundo if que ta == true
por um simples else e ve se vai.
Caso nгo de, debugue esse if que ta True com
pawn Код:
printf("Sirene Removida com sucesso!");
E ve se aparece no console
Re: Sistema de Sirenes 0.3e AJUDA! -
iTzDemon - 07.09.2012
da 2 erros,
Код:
C:\Users\Joгo Neto\Desktop\ExtremeTuga RP\EXT RP\gamemodes\GMRP.pwn(15176) : error 017: undefined symbol "sirenes"
C:\Users\Joгo Neto\Desktop\ExtremeTuga RP\EXT RP\gamemodes\GMRP.pwn(15177) : error 017: undefined symbol "sirenes"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Код:
if (strcmp("/sirenepsp2", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][Faction] != 255 && DynamicFactions[PlayerInfo[playerid][Faction]][fType] == 1)
{
if(DynamicFactions[DynamicCars[GetPlayerVehicleID(playerid)-1][FactionCar]][fType] == 1)
{
new car = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(car);
if(model != 497 && model != 528 && model != 427 && model != 601 && model != 599 && model != 598 && model != 597 && model != 596 && model != 523)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(Police[car][Use] == false)
{
Police[car][Use] = true;
new sirenes = CreateObject(19419, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(sirenes, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
return 1;
}
else
{
Police[car][Use] = false;
AttachObjectToVehicle(sirenes, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
DestroyObject(sirenes);
return 1;
}
}
}
}
return 1;
}
return 1;
}
return 1;
}
Re: Sistema de Sirenes 0.3e AJUDA! -
tigasfilipinos - 07.09.2012
UP ajuda ae
Re: Sistema de Sirenes 0.3e AJUDA! -
tigasfilipinos - 07.09.2012
Resolvido, podem fechar ai, obrigado a quem tentou ajudar neste topico