Sistema pedagio -
netogba - 09.10.2012
Fiz meu sistema pedagio bбsico mas... ele nгo funciona.
Код:
if(CPS_IsPlayerInCheckpoint(playerid, checkpedagio) && IsPlayerInAnyVehicle(playerid))
{
format(string, sizeof(string), "Bem vindo ao pedagio, deseja passar?", nome(playerid));
ShowPlayerDialog(playerid, DIALOGID+17, DIALOG_STYLE_MSGBOX, "Pedagio", string, "Sim", "Nгo");
}
if(CPS_IsPlayerInCheckpoint(playerid, checkpedagio2) && IsPlayerInAnyVehicle(playerid))
{
format(string, sizeof(string), "Bem vindo ao pedagio, deseja passar?", nome(playerid));
ShowPlayerDialog(playerid, DIALOGID+18, DIALOG_STYLE_MSGBOX, "Pedagio", string, "Sim", "Nгo");
}
Код:
if(dialogid == DIALOGID+17)
{
if(response)
{
SetVehiclePos(vehicleid,50.4686,-1524.8268,5.0681);
}
else
{
SetVehiclePos(vehicleid,67.2928,-1527.2106,4.8696);
}
}
if(dialogid == DIALOGID+18)
{
if(response)
{
SetVehiclePos(vehicleid,63.1642,-1540.7421,5.0588);
}
else
{
SetVehiclePos(vehicleid,52.5437,-1537.2518,5.1314);
}
}
return 1;
}
porque quando eu chego lб sу funciona um e nгo funciona direito?
Re: Sistema pedagio -
humildadeforever - 09.10.2012
O que deveria acontecer e o que estб acontecendo?
Re: Sistema pedagio -
netogba - 09.10.2012
Quote:
Originally Posted by humildadeforever
O que deveria acontecer e o que estб acontecendo?
|
Tipo quando eu coloco sу um check point ele vai para as coordenadas certas, mais quando eu coloco o outro e fica com as coordenadas tudo trocadas... e o checkpedagio nгo funciona, ele nгo vai para nada, mais o checkpedagio2 vai sim mais ele vai para as coordenadas do checkpedagio.
Re: Sistema pedagio -
humildadeforever - 09.10.2012
Poste a criaзгo dos checkpoints.
Dica: Caso nгo dк pra utilizar checkpoint, vocк pode optar por Pickup, OnPlayerUpdate + IsPlayerInRangeOfPoint ou 1 Timer + IsPlayerInRangeOfPoint
Re: Sistema pedagio -
Metropole RP - 09.10.2012
Tenta ae
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
if(CPS_IsPlayerInCheckpoint(playerid, checkpedagio))
{
ShowPlayerDialog(playerid, DIALOGID+17, DIALOG_STYLE_MSGBOX, "Pedagio", "Bem vindo ao pedagio, deseja passar?", "Sim", "Nгo");
}
else if(CPS_IsPlayerInCheckpoint(playerid, checkpedagio2))
{
ShowPlayerDialog(playerid, DIALOGID+18, DIALOG_STYLE_MSGBOX, "Pedagio", string, "Sim", "Nгo");
}
}
if(dialogid == DIALOGID+17)
{
if(response)
{
SetVehiclePos(vehicleid,50.4686,-1524.8268,5.0681);
}
else
{
SetVehiclePos(vehicleid,67.2928,-1527.2106,4.8696);
}
}
else if(dialogid == DIALOGID+18)
{
if(response)
{
SetVehiclePos(vehicleid,63.1642,-1540.7421,5.0588);
}
else
{
SetVehiclePos(vehicleid,52.5437,-1537.2518,5.1314);
}
}
Re: Sistema pedagio -
netogba - 09.10.2012
Quote:
Originally Posted by humildadeforever
Poste a criaзгo dos checkpoints.
Dica: Caso nгo dк pra utilizar checkpoint, vocк pode optar por Pickup, OnPlayerUpdate + IsPlayerInRangeOfPoint ou 1 Timer + IsPlayerInRangeOfPoint
|
Os checks points estб certos, o problema й sу na criaзгo do dialog.
Re: Sistema pedagio -
humildadeforever - 09.10.2012
Quote:
Originally Posted by netogba
Os checks points estб certos, o problema й sу na criaзгo do dialog.
|
Esse negуcio de DIALOGID+*Tanto* nгo presta, й mais fбcil de causar conflitos. O bom й definir 1 por 1 numa lista, assim vocк nunca vai definir com o mesmo ID, bugando :S
Utiliza algum FS?
Re: Sistema pedagio -
netogba - 09.10.2012
FS Nгo '-'
Re: Sistema pedagio -
netogba - 09.10.2012
Quote:
Originally Posted by Metropole RP
Tenta ae
pawn Код:
if(IsPlayerInAnyVehicle(playerid)) { if(CPS_IsPlayerInCheckpoint(playerid, checkpedagio)) { ShowPlayerDialog(playerid, DIALOGID+17, DIALOG_STYLE_MSGBOX, "Pedagio", "Bem vindo ao pedagio, deseja passar?", "Sim", "Nгo"); } else if(CPS_IsPlayerInCheckpoint(playerid, checkpedagio2)) { ShowPlayerDialog(playerid, DIALOGID+18, DIALOG_STYLE_MSGBOX, "Pedagio", string, "Sim", "Nгo"); } }
if(dialogid == DIALOGID+17) { if(response) { SetVehiclePos(vehicleid,50.4686,-1524.8268,5.0681); } else { SetVehiclePos(vehicleid,67.2928,-1527.2106,4.8696); } } else if(dialogid == DIALOGID+18) { if(response) { SetVehiclePos(vehicleid,63.1642,-1540.7421,5.0588); } else { SetVehiclePos(vehicleid,52.5437,-1537.2518,5.1314); } }
|
Mesma coisa.
Re: Sistema pedagio -
Metropole RP - 09.10.2012
Entгo o erro nгo estб na seu Dialog