26.05.2018, 15:33
I have a problem. After reaching the checkpoint. I get the message "The player KamilPolska delivered the unloading to the H". Why does it show one letter "H"? And not "Hospital LV"
Код:
enum MissionLocationData { ID_Mission, NamePoint[128], Float:UnloadX, Float:UnloadY, Float:UnloadZ, Pay, PayScore } new MissionLocation[][MissionLocationData] = { {0, "Hospital LV", 1632.0656, 1825.9324, 10.8203, 2750, 10}, };
Код:
new i_Pay[MAX_PLAYERS], i_PayScore[MAX_PLAYERS], MissionStatus[MAX_PLAYERS], i_MissionText[MAX_PLAYERS];
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch (dialogid) { case DIALOG_MISSIONS1: { if(response) { MissionStatus[playerid] = 1; new Float:x, Float:y, Float:z; x = MissionLocation[0][UnloadX]; y = MissionLocation[0][UnloadY]; z = MissionLocation[0][UnloadZ]; i_Pay[playerid] = MissionLocation[0][Pay]; i_PayScore[playerid] = MissionLocation[0][PayScore]; i_MissionText[playerid] = MissionLocation[0][NamePoint]; SetPlayerCheckpoint(playerid, x, y, z, 5); SendClientMessage(playerid, COLOR_BLACK, "{FFFFFF}Go to point!"); } else { return Mission_Cancel(playerid); } } default: return 0; } return 1; }
Код:
stock CheckpointEntered(playerid) { new vID = GetPlayerVehicleID(playerid); if(GetVehicleModel(vID) == 403 || GetVehicleModel(vID) == 515 || GetVehicleModel(vID) == 514) { if(IsTrailerAttachedToVehicle(vID)) { if(MissionStatus[playerid] == 1) { DisablePlayerCheckpoint(playerid); TogglePlayerControllable(playerid, 0); SetTimerEx("unloading", 10000, 0, "i", playerid); } } else { SendClientMessage(playerid, COLOR_BLACK, ""); } } else { SendClientMessage(playerid, COLOR_BLACK, ""); } return 1; } forward unloading(playerid); public unloading(playerid) { new vID = GetPlayerVehicleID(playerid); new TrailerID = GetVehicleTrailer(vID); new string_mission[300]; TogglePlayerControllable(playerid, true); SucessMission(playerid); SetVehicleToRespawn(TrailerID); return 1; }
Код:
SucessMission(playerid) { new string_msg[300]; format(string_msg, 300, "{FFFFFF}The player %s delivered the unloading to the %s", PlayerName(playerid), i_MissionText[playerid]); SendClientMessageToAll(COLOR_BLACK, string_msg); return 1; }