21.01.2015, 20:17
Hello,
I got an issue, i created for the /mask an CreateDynamic3DTextLabel But its not showing up when players do /mask
Can you maybe fix it for me?
I got an issue, i created for the /mask an CreateDynamic3DTextLabel But its not showing up when players do /mask
Can you maybe fix it for me?
pawn Код:
CMD:mask(playerid, params[])
{
new string[128], playerb, Float: H, Float: A;
if(isStranged[playerid] == false)
{
isStranged[playerid] = true;
GetPlayerHealth(playerb, H); GetPlayerArmour(playerb, A);
SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to remove it)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
format(string, sizeof(string), "Masked(%d)\nHealth: %d Armour: %d",i+14, H, A);
MaskLabel[i] = CreateDynamic3DTextLabel(string, GetPlayerColor(playerid), 0, 0, 0.200, 25, playerid,INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
}
}
else
{
isStranged[playerid] = false;
SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!");
if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
DestroyDynamic3DTextLabel(MaskLabel[i]);
}
}
return 1;
}