16.04.2012, 00:18
Just experimenting with this. This is supposed to add a text label for the shooter to the victim. The shooter would see "50" above the victims head if he gets shot with a deagle. But it doesn't even show the text at all for the shooter.
No errors whatsoever, it just doesn't show the text.
No errors whatsoever, it just doesn't show the text.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
new string[5];
format(string, sizeof(string), "%d", amount);
if(DamageText[issuerid][0] != PlayerText3D:INVALID_3DTEXT_ID)
{
DamageText[issuerid][0] = CreatePlayer3DTextLabel(issuerid, string, 0xFFFF00FF, 0.0,0.0,13.3828, 1000.0, playerid, INVALID_VEHICLE_ID, 0);
}
else if(DamageText[issuerid][1] != PlayerText3D:INVALID_3DTEXT_ID)
{
DamageText[issuerid][1] = CreatePlayer3DTextLabel(issuerid, string, 0xFFFF00FF, 0.0,0.0,15.3828, 1000.0, playerid, INVALID_VEHICLE_ID, 0);
}
else if(DamageText[issuerid][2] != PlayerText3D:INVALID_3DTEXT_ID)
{
DamageText[issuerid][2] = CreatePlayer3DTextLabel(issuerid, string, 0xFFFF00FF, 0.0,0.0,17.3828, 1000.0, playerid, INVALID_VEHICLE_ID, 0);
}
else if(DamageText[issuerid][3] != PlayerText3D:INVALID_3DTEXT_ID)
{
DamageText[issuerid][3] = CreatePlayer3DTextLabel(issuerid, string, 0xFFFF00FF, 0.0,0.0,19.3828, 1000.0, playerid, INVALID_VEHICLE_ID, 0);
}
else if(DamageText[issuerid][4] != PlayerText3D:INVALID_3DTEXT_ID)
{
DamageText[issuerid][4] = CreatePlayer3DTextLabel(issuerid, string, 0xFFFF00FF, 0.0,0.0,21.3828, 1000.0, playerid, INVALID_VEHICLE_ID, 0);
}
}
return 1;
}