PlayerCreateTextDraw fuction related..
#1

Hey guys so i just tried to use PlayerCreateTextDraw fuction and all the related to it for a textdraw with an array " HEALTH[playerid]

but when i converted

it with using Playeri n front of the textdraw fuctions it showed 23 warnings D:
pawn Код:
HEALTH[playerid] = CreatePlayerTextDraw(playerid,20.000000, 272.000000, "");
    PlayerTextDrawBackgroundColor(playerid,HEALTH[playerid], 255);
    PlayerTextDrawFont(playerid,HEALTH[playerid], 2);
    PlayerTextDrawLetterSize(playerid,HEALTH[playerid], 0.150000, 1.000000);
    PlayerTextDrawColor(playerid,HEALTH[playerid], -1);
    PlayerTextDrawSetOutline(playerid,HEALTH[playerid], 0);
    PlayerTextDrawSetProportional(playerid,HEALTH[playerid], 1);
    PlayerTextDrawSetShadow(playerid,HEALTH[playerid], 1);

    SPEEDOS[playerid] = CreatePlayerTextDraw(playerid,19.000000, 282.000000, "");
    PlayerTextDrawBackgroundColor(playerid,SPEEDOS[playerid], 255);
    PlayerTextDrawFont(playerid,SPEEDOS[playerid], 2);
    PlayerTextDrawLetterSize(playerid,SPEEDOS[playerid], 0.190000, 1.000000);
    PlayerTextDrawColor(playerid,SPEEDOS[playerid], -1);
    PlayerTextDrawSetOutline(playerid,SPEEDOS[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SPEEDOS[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SPEEDOS[playerid], 1);
Warnings:
pawn Код:
(1443) : warning 213: tag mismatch
(1444) : warning 213: tag mismatch
(1445) : warning 213: tag mismatch
(1446) : warning 213: tag mismatch
(1447) : warning 213: tag mismatch
(1448) : warning 213: tag mismatch
(1449) : warning 213: tag mismatch
(1450) : warning 213: tag mismatch
(1452) : warning 213: tag mismatch
(1453) : warning 213: tag mismatch
(1454) : warning 213: tag mismatch
(1455) : warning 213: tag mismatch
(1456) : warning 213: tag mismatch
(1457) : warning 213: tag mismatch
(1458) : warning 213: tag mismatch
(1459) : warning 213: tag mismatch
(3993) : warning 213: tag mismatch
(3994) : warning 213: tag mismatch
(3998) : warning 213: tag mismatch
(3999) : warning 213: tag mismatch
Reply
#2

Show how you created the arrays.
Reply
#3

pawn Код:
new Text:SPEEDOS[MAX_PLAYERS];
new Text:HEALTH[MAX_PLAYERS];
and to a callback i use

pawn Код:
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
        final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*250.666667; // 250.666667 = kmph  // 199,4166672= mph
        final_speed_int = floatround(final_speed,floatround_round);
        format(speed_string,256,"~y~Speed: ~w~%i",final_speed_int);
        PlayerTextDrawSetString(playerid,SPEEDOS[playerid], speed_string);
        PlayerTextDrawShow(playerid,SPEEDOS[playerid]);
        GetVehicleHealth(vehicleid,vehicle_health);
        final_vehicle_health = floatround(floatround(vehicle_health - 250)/ 7.5); //This will make the health show at 100 when the vehicle is not damaged and at 0 when it is in fire.
        format(health_string,256,"~r~Health: ~w~%i", final_vehicle_health);
        PlayerTextDrawSetString(playerid,HEALTH[playerid], health_string);
        PlayerTextDrawShow(playerid,HEALTH[playerid]);
Reply
#4

Should be

pawn Код:
new PlayerText:SPEEDOS[MAX_PLAYERS];
new PlayerText:HEALTH[MAX_PLAYERS];
Reply
#5

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Should be

pawn Код:
new PlayerText:SPEEDOS[MAX_PLAYERS];
new PlayerText:HEALTH[MAX_PLAYERS];
Oh you are right i forgot about that thank you.
+Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)