SA-MP Forums Archive
Create3DText Depending on Score? - 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: Create3DText Depending on Score? (/showthread.php?tid=387278)



Create3DText Depending on Score? - Eminem 2ka9 - 23.10.2012

I need a text to appear above players heads if they have a score like 5000 or higher, then they are sergeant etc.. I don't have the rank system with me now. I need to do multiple of them like 3500 = major then "Major" Will apear above players name. thaanks I know it seems easy but I'm a scripting newbie


Re: Create3DText Depending on Score? - ThePhenix - 23.10.2012

PHP код:
//:::::::::::::::::::::::
new Text3D:private[MAX_PLAYERS];
new 
Text3D:major[MAX_PLAYERS];
new 
Text3D:captain[MAX_PLAYERS];
//:::::::::::::::::::::::
public OnPlayerSpawn(playerid)
//..........................................//
{
 if(
GetPlayerScore(playerid) >= && GetPlayerScore(playerid) < 150
    {
    private[
playerid] = Create3DTextLabel("Private"GREEN,0,0,0,70.5,1);
    }
    if(
GetPlayerScore(playerid) >= 150 && GetPlayerScore(playerid) < 350)
    {
     
major[playerid] = Create3DTextLabel("Major"GREEN,0,0,0,70.5,1);
    }
    if(
GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) < 500)
    {   
     
captain[playerid] = Create3DTextLabel("Captain"GREEN,0,0,0,70.5,1);
    }
    return 
1;