textdraw help
#1

Guys, I've created a total of 14 textdraws which are basically to display rank. (I'm currently testing this 4). I'm able to display the textdraw's properly. The thing I can't wrap my head around is for a different team, a different textdraw is to be displayed. How do I do that? Here's my OnPlayerSpawn

Код:
if(GetPlayerScore(playerid)  > 12000)
{
    TextDrawShowForPlayer(playerid, Boss);
}
else if(GetPlayerScore(playerid)  > 8000)
{
    TextDrawShowForPlayer(playerid, Slinger);
}
else if(GetPlayerScore(playerid)  > 100)
{
    TextDrawShowForPlayer(playerid, Killer);
}
else
{
    TextDrawShowForPlayer(playerid, Newbie);
}
Well that displays for like almost all my teams, but I have 2 teams which have to use different textdraws.... So how do I do that? I already tried else if(GetPlayerTeam(playerid) != 2 && 9) but it seems to overlap with the others or the thing gets messed up....

So basically, what I want is when the player has a score of 12k above, it displays "Boss" but if they are in teams 2 or 9, it will display "KingPin" instead, so how do I get around this? Any help will be much appreciated.
Reply
#2

Try this:

Код:
if(GetPlayerScore(playerid)  > 12000)
{
    if(GetPlayerTeam(playerid) == 2 || GetPlayerTeam(playerid) == 9)
    {
        TextDrawShowForPlayer(playerid, KingPin);
    } else {
        TextDrawShowForPlayer(playerid, Boss);
    }
}
else if(GetPlayerScore...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)