02.04.2014, 08:10
Hi , how to create CreatePlayer3DTextLabel that if player get wanted level >= 5 to create text at player body "Most wanted Player" ?
//Top of the script, making a global variable
new Text3D:wantedlabel;
//Under your killstreak part of OnPlayerDeath
SetPlayerWantedLevel(killerid, 5);
//Attaching the actuall label to the player. Still under your killstreak code
wantedlabel = Create3DTextLabel("Most Wanted Player!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
//Removing the label when the player dies..
//OnPlayerDeath
DeletePlayer3DTextLabel(playerid, Text3D:wantedlabel);
if(GetPlayerWantedLevel(playerid) >= 5)
{
new Text3D:Label[MAX_PLAYERS];
Delete3DTextLabel(Label[playerid]);
Label[playerid] = Create3DTextLabel("Most Wanted", 0xFF0000FF, 0.0, 0.0, 0.7, 40.0, 0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.5);
}
pawn Код:
|