help with player text - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with player text (
/showthread.php?tid=279657)
help with player text -
[LHT]Bally - 28.08.2011
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);
}
Re: help with player text -
AndreT - 28.08.2011
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.
Re: help with player text -
Cameltoe - 28.08.2011
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]);
}
}
-
[LHT]Bally - 28.08.2011
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