10.12.2014, 14:27
Hola bueno resulta que al poner /cargar camion sale el cp pero al ir al cp no sale el dialog para elegir la carga.
Dejo codigo:
Dejo codigo:
Код:
CMD:cargar(playerid, params[]) { new choice[32]; if(sscanf(params, "s[32]", choice)) { SendClientMessage(playerid, COLOR_WHITE, "USA: /cargar [camion/camionvip]"); return 1; } else if(strcmp(choice, "camion", true) == 0) { if(Info[playerid][pJob] == 7 || Info[playerid][pJob2] == 7) { if(Info[playerid][p_Pr_Time] == 1000) return SendClientMessageEx(playerid, COLOR_GREY, "Ya hiciste 1000 viajes en estб hora de pago, espera al proximo payday."); new vehicleid = GetPlayerVehicleID(playerid); if(IsATruckerCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(gPlayerCheckpointStatus[playerid] == CHECKPOINT_NONE || GetPVarInt(playerid, "Packages") == 0 || TaxiAccepted[playerid] == 999 || EMSAccepted[playerid] == 999 || MedicAccepted[playerid] == 999 || MechanicCallTime[playerid] == 0) { if(GetProgressBarValue(LoadTruckBar[playerid]) > 30) { SendClientMessageEx(playerid, COLOR_WHITE, "En este momento estб cargando su camiуn!"); return 1; } if(TruckUsed[playerid] != INVALID_VEHICLE_ID) { SendClientMessageEx(playerid, COLOR_WHITE, "Ya estбs en otra entrega, usa /cancelar camiуn para cancelar la entrega."); return 1; } gPlayerCheckpointStatus[playerid] = CHECKPOINT_LOADTRUCK; SetPlayerCheckpoint(playerid,2484.3347,-2120.1353,13.5469, 4); GameTextForPlayer(playerid, "~w~Ve al checkpoint", 5000, 1); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Recoge mercancнa en la zona de carga"); } else return SendClientMessageEx(playerid, COLOR_WHITE, "Por favor, asegъrese de que su checkpoint actual estй destruido."); } else return SendClientMessageEx(playerid, COLOR_GREY, "No estбs manejando un camiуn"); } else return SendClientMessageEx(playerid, COLOR_GREY, "No eres camionero!"); return 1; }
Код:
switch (gPlayerCheckpointStatus[playerid]) { case CHECKPOINT_LOADTRUCK: { if(IsPlayerInRangeOfPoint(playerid, 6, 2509.0952,-2120.7627,13.5469)) { new vehicleid = GetPlayerVehicleID(playerid); if(IsATruckerCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { DisablePlayerCheckpoint(playerid); PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; TogglePlayerControllable(playerid, 0); SetPVarInt(playerid, "IsFrozen", 1); SafeDialogEx(playerid,DIALOG_LOADTRUCK,DIALOG_STYLE_LIST,"їQue quieres transportar?","{00F70C}Mercancнa Legal {FFFFFF}(Ningъn riesgo)\n{FF0606}Mercancнa Ilegal {FFFFFF}(Riesgo de quedar encarcelado)","Ok","Cancelar"); } else return SendClientMessageEx(playerid, COLOR_GREY, "No estбs en un camiуn para transportar."); } }