CreateDynamic3DTextLabel
#2

if your vehicleModel is 0 and you minus it with 400 result will be -400 so it will crash, check if vehiclemodel is valid before doing the label like how I've did below codes:
PHP код:
            new labelstring[300];
            new 
vehicleModel hVehicleData[playerid][i][ModelID];
            if(
vehicleModel// checks if vehicleModel value isn't 0
            
{
                
format(labelstringsizeof(labelstring), "{58D3F7}[House Car] \n Name: %s \n Owner: %s"vehicleNames[vehicleModel 400], pname);
                
hVehicleData[playerid][i][hvLabel] = CreateDynamic3DTextLabel(labelstringCOLOR_WHITE0.00.01.215.0INVALID_PLAYER_IDhVehicleData[playerid][i][hVehicleID], 00, -1, -1); 
            }
            else
            {
                
format(labelstringsizeof(labelstring), "{58D3F7}[House Car] \n Name: Null \n Owner: Null");
                
hVehicleData[playerid][i][hvLabel] = CreateDynamic3DTextLabel(labelstringCOLOR_WHITE0.00.01.215.0INVALID_PLAYER_IDhVehicleData[playerid][i][hVehicleID], 00, -1, -1); 
            } 
Reply


Messages In This Thread
CreateDynamic3DTextLabel - by iLearner - 26.09.2016, 07:35
Re: CreateDynamic3DTextLabel - by jlalt - 26.09.2016, 07:40
Re: CreateDynamic3DTextLabel - by iLearner - 26.09.2016, 07:41
Re: CreateDynamic3DTextLabel - by iLearner - 26.09.2016, 07:48

Forum Jump:


Users browsing this thread: 1 Guest(s)