help with player text
#1

right thankyou for viewing the thread. what i need toi know how to do is when a player is wanted it says above the head WANTED BY POLICE in red and blue. i was given this as part of a script but sadly this did not work.

all help apreciated

pawn Code:
public PlayerPolice(playerid)
{
    new PlayerText3D:policewanted;
    new Float:X, Float:Y, Float:Z;
    if(GetPlayerWantedLevel(playerid, 1);
    policewanted = CreatePlayer3DTextLabel(playerid, "WANTED BY POLICE);
}

stock PlayerPoliceunwanted[playerid;
public PlayerPoliceunwanted(playerid)
{
    if(GetPlayerWantedLevel(playerid, 0);
    DeletePlayer3DTextLabel(playerid, policewanted);
}
Reply
#2

It looks like you're missing the basics of scripting - for example how if statements work.
pawn Code:
// wrong
if(GetPlayerWantedLevel(playerid, 0);
// right
if(GetPlayerWantedLevel(playerid) == 0)
Then you need to look into Text3D tags, the Create3DTextLabel function and everything else too. But it might be useful to learn the basics first.
Reply
#3

pawn Code:
new Text3D:policewanted[MAX_PLAYERS];


forward PlayerPolice(playerid);
public PlayerPolice(playerid)
{
    if(GetPlayerWantedLevel(playerid) > 0)
    {
        policewanted[playerid] = Create3DTextLabel("WANTED BY POLICE", 0xFF2800FF, 0, 0, 0, 50, 0, 1);
        Attach3DTextLabelToPlayer(policewanted[playerid], playerid, 0.0, 0.0, 0.7);
    }
}

forward PlayerPoliceunwanted(playerid);
public PlayerPoliceunwanted(playerid)
{
    if(GetPlayerWantedLevel(playerid) == 0)
    {
        Delete3DTextLabel(policewanted[playerid]);
    }
}
Reply
#4

thats how it was given to me

it was gave to me in a filterscript by someone i exchanged scripts with and they bolloxed it up on me im sure of it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)