errors:
Код:
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error 017: undefined symbol "playerid"
error on this code:
LoadTextDraws()
{
healthtd[playerid] = CreatePlayerTextDraw(playerid, 559.798217, 47.166923, "000.00");
PlayerTextDrawLetterSize(playerid, healthtd[playerid], 0.246009, 1.050000);
PlayerTextDrawAlignment(playerid, healthtd[playerid], 1);
PlayerTextDrawColor(playerid, healthtd[playerid], 65535);
PlayerTextDrawSetShadow(playerid, healthtd[playerid], 1);
PlayerTextDrawSetOutline(playerid, healthtd[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, healthtd[playerid], 255);
PlayerTextDrawFont(playerid, healthtd[playerid], 1);
PlayerTextDrawSetProportional(playerid, healthtd[playerid], 1);
PlayerTextDrawSetShadow(playerid, healthtd[playerid], 1);
}
code:
PHP код:
new PlayerText:healthtd[MAX_PLAYERS];
public OnGameModeInit()
{
LoadTextDraws();
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
PlayerTextDrawShow(playerid, healthtd[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
PlayerTextDrawHide(playerid, healthtd[playerid]);
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
new string[12], Float:hp;
GetPlayerHealth(playerid, hp);
format(string, sizeof(string), "%0f", hp);
PlayerTextDrawSetString(playerid, healthtd[playerid], string);
return 1;
}
LoadTextDraws()
{
healthtd[playerid] = CreatePlayerTextDraw(playerid, 559.798217, 47.166923, "000.00");
PlayerTextDrawLetterSize(playerid, healthtd[playerid], 0.246009, 1.050000);
PlayerTextDrawAlignment(playerid, healthtd[playerid], 1);
PlayerTextDrawColor(playerid, healthtd[playerid], 65535);
PlayerTextDrawSetShadow(playerid, healthtd[playerid], 1);
PlayerTextDrawSetOutline(playerid, healthtd[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, healthtd[playerid], 255);
PlayerTextDrawFont(playerid, healthtd[playerid], 1);
PlayerTextDrawSetProportional(playerid, healthtd[playerid], 1);
PlayerTextDrawSetShadow(playerid, healthtd[playerid], 1);
}