new Text3D:vehdamage;new dmgupdate;public OnPlayerStateChange(playerid, newstate, oldstate){ if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver { new vehicleid = GetPlayerVehicleID(playerid); vehdamage = Create3DTextLabel( \"VehDamage\", 0x008080FF, 0.0, 0.0, 0.0, 50.0, 0, 1); Attach3DTextLabelToVehicle( vehdamage, vehicleid, 0.0, 0.0, 2.0); dmgupdate = SetTimer(\"damageupdate\", 2000, 1); } else if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT) { KillTimer(dmgupdate); Delete3DTextLabel(Text3D:vehdamage); } return 1;}forward damageupdate(playerid);public damageupdate(playerid){new dmgstr[10],Float:vhp;new vehicleid = GetPlayerVehicleID(playerid);GetVehicleHealth(vehicleid, vhp);if(900 < vhp <= 1000) {format(dmgstr, sizeof(dmgstr), \"{2bff00}oooooooooo\");} else if(800 < vhp <= 900) { format(dmgstr, sizeof(dmgstr), \"{2bff00}ooooooooo\"); } else if(700 < vhp <= 800) { format(dmgstr, sizeof(dmgstr), \"{2bff00}oooooooo\");} else if(600 < vhp <= 700) { format(dmgstr, sizeof(dmgstr), \"{2bff00}ooooooo\");} else if(500 < vhp <= 600) { format(dmgstr, sizeof(dmgstr), \"{2bff00}oooooo\");} else if(400 < vhp <= 500) { format(dmgstr, sizeof(dmgstr), \"{2bff00}ooooo\");} else if(300 < vhp <= 400) { format(dmgstr, sizeof(dmgstr), \"{2bff00}oooo\");} else if(200 < vhp <= 300) { format(dmgstr, sizeof(dmgstr), \"{2bff00}ooo\");} else if(100 < vhp <= 200) { format(dmgstr, sizeof(dmgstr), \"{2bff00}oo\");}Update3DTextLabelText(vehdamage, 0xFFFFFFFF, dmgstr);return 1;}