PDA

View Full Version : Textdraws not showing


conor565
05/07/2015, 10:33 PM
Issue resolved

conor565
09/07/2015, 09:14 PM
Anyone got any suggestions?

Misiur
09/07/2015, 09:18 PM
Hm, could you show more context in OnPlayerStateChange?

conor565
09/07/2015, 10:07 PM
Since nothing was showing from "OnPlayerEntervehicle" I moved some of the code over to state change so heres more of the context

if(newstate == PLAYER_STATE_DRIVER) {

iPlayerInVeh[playerid]++;

new
newcar = GetPlayerVehicleID(playerid);

if(VehicleData[newcar][v_iProcessed] == false) VehicleData[newcar][v_iProcessed] = true, Vehicle_ResetData(newcar);

VehicleData[newcar][v_iOccupied] += 1;

GetVehicleParamsEx(GetPlayerVehicleID(playerid),en gine,lights,alarm,doors,bonnet,boot,objective);

if(!GetPVarInt(playerid, "VehicleCMDHelp")) {
if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
SendClientMessage(playerid, COLOR_GRAD1, "Vehicle engine is currently off, to start the engine use '/v engine'.");

if(isnull(VehicleData[GetPlayerVehicleID(playerid)][v_szRadioStation]))
SendClientMessage(playerid, COLOR_GRAD1, "Vehicle radio is currently off, to listen to the radio use '/setstation'.");

SetPVarInt(playerid, "VehicleCMDHelp", 1);
}

if(IsABike(newcar) && IsABoat(newcar))
VehicleData[newcar][v_iWindows] = 1;

if(VehicleData[newcar][v_fFuel] == 0.0)
SendClientMessage(playerid, COLOR_GRAD1, "This vehicle is currently out of fuel, please go to the nearest gas station & use '/refuel'.");

VehicleData[GetPlayerVehicleID(playerid)][v_iFuelUpdate] = SetTimerEx("PlayerVehicleFuelUpdate", FUEL_UPDATE_TIME, 1, "i", playerid);

TextDrawShowForPlayer(playerid, TextDraw[playerid][0]);
TextDrawShowForPlayer(playerid, TextDraw[playerid][1]);
TextDrawShowForPlayer(playerid, TextDraw[playerid][2]);
TextDrawShowForPlayer(playerid, TextDraw[playerid][3]);

format(string, sizeof(string), "Fuel: U");
TextDrawSetString(TextDraw[playerid][1], string);
TextDrawShowForPlayer(playerid, TextDraw[playerid][1]);