tag mismatch
#1

pawn Код:
public speedometer(playerid){
GetVehicleVelocity(GetPlayerVehicleID(playerid),xxx[playerid],yyy[playerid],zzz[playerid]);
speed1[playerid] = floatsqroot(((xxx[playerid]*xxx[playerid])+(yyy[playerid]*yyy[playerid]))+(zzz[playerid]*zzz[playerid]))*100;
speed2[playerid] = floatround(speed1[playerid],floatround_round);
format(speed3[playerid],256,"Speed: %i",speed2[playerid]);
TextDrawSetString(speeddis[playerid],speed3[playerid]);
new vehicleid = GetPlayerVehicleID(playerid);
new Float:vehicle_health,final_vehicle_health,health_string[256];
if(vehicleid != 0){
GetVehicleHealth(vehicleid,vehicle_health);
final_vehicle_health = floatround(floatround(vehicle_health - 250)/ 7.5);
format(health_string,256,"Health %i", final_vehicle_health);
TextDrawSetString(HEALTH[playerid], health_string);}
return 1;}
the line with the problem is the last line (not the return 1;... the TextDrawSetString)
Reply
#2

Try this
PHP код:
new player_health;
player_health HEALTH[playerid];
TextDrawSetString(player_healthhealth_string);} 
Reply
#3

It should've been declared as (for your case):
pawn Код:
new Text: HEALTH[MAX_PLAYERS];
But I'd recommend per-player textdraws.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)