public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
new veh = GetPlayerVehicleID(playerid);
if(checkpointid == CPCargarCamion[playerid])
{
if(GetTruckID(veh) != -1)
{
new str[1024];
DestroyDynamicCP(CPCargarCamion[playerid]);
for(new i = 0; i <= MAX_ENTREGAS_CAMIONES; i++)
{
if(InformacionEntregaCam[i][EC_EXISTE] == true)
{
if(InformacionEntregaCam[i][EC_DISPONIBLE] == true)
{
format(str, sizeof(str), "%s\n{FFFFFF}%s {00C900}[DISPONIBLE]",str,InformacionEntregaCam[i][EC_NOMBRE]);
}
else
{
format(str, sizeof(str), "%s\n{FFFFFF}%s {D90000}[ENTREGA EN PROCESO]",str,InformacionEntregaCam[i][EC_NOMBRE]);
}
}
}
ShowPlayerDialog(playerid, DIALOG_CARGAR_CAMION, DIALOG_STYLE_LIST, "Lista de entregas", str, "Seleccionar", "Cerrar");
}
else
{
MensajeError(playerid, "No estas en un camiуn del empleo.");
}
}
return 1;
}
printf("GetTruckID: %d", GetTruckID(veh));
if(GetTruckID(veh) != -1)
{
print("GetTruckID != -1");
...
}
else print("GetTruckID == -1);
Dentro de cada condiciуn coloca un print para saber si se estan ejecutando o no. Eso es para saber si la condiciуn se cumple.
un ejemplo: pawn Код:
|
que numero le pusiste al DIALOG_CARGAR_CAMION ?
en #define DIALOG_CARGAR_CAMION ? |
/* ===== Dialog's ===== */ #define DIALOG_REGISTRO 8541 #define DIALOG_LOGEO 8542 #define DIALOG_SEXO 8543 #define DIALOG_EDAD 8544 #define DIALOG_COMPRAR_VEH 8545 #define DIALOG_CARGAR_CAMION 8546 #define DIALOG_INVENTARIO 8547 #define DIALOG_ORIGEN_PJ 8548
new string[]; //llena los corchetes
//Debajo de los format usa:
strcat(string, str);
//En el dialogo muestra la variable string.
//el format modificalo, quitale la primera %s y el \n pasalo al final.
format(str, sizeof(str), "{FFFFFF}%s {00C900}[DISPONIBLE]\n",InformacionEntregaCam[i][EC_NOMBRE]);
//Antes de mostrar el dialogo usa
print(string);
print(str);
for(new i = 0; i <= MAX_ENTREGAS_CAMIONES; i++)
for(new i = 0; i < MAX_ENTREGAS_CAMIONES; i++)