SA-MP Forums Archive
Putting Text Draw in Rank SYstem (rep++) - 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: Putting Text Draw in Rank SYstem (rep++) (/showthread.php?tid=332714)



Help In Rank Sytem>> (Changed) - iOmar - 09.04.2012

==> I want when Some Player get score higher than 150 than he will get this text draw. I set its position and colours. But where to put it?? I don't know how?? How to Do it?? Can some One Help??

pawn Код:
CMD:rank(playerid,params[])
{
 if(GetPlayerScore(playerid) > 0 )
 {
    SendClientMessage(playerid,GREEN,"Your rank is Rookie!");
 }
 if(GetPlayerScore(playerid) > 150)
 {
    SendClientMessage(playerid,GREEN,"Your rank is Private!");
 }
 if(GetPlayerScore(playerid) > 250)
 {
    SendClientMessage(playerid,GREEN,"Your rank is Corporal!");
 }
 if(GetPlayerScore(playerid) > 350)
 {
    SendClientMessage(playerid,GREEN,"Your rank is Sergeant!");
 }
 if(GetPlayerScore(playerid) > 500)
 {
    SendClientMessage(playerid,GREEN,"Your rank is Captain!");
 }
 if(GetPlayerScore(playerid) > 750)
 {
    SendClientMessage(playerid, GREEN,"Your rank is Bergadier!");
 }
 if(GetPlayerScore(playerid) > 1200)
 {
    SendClientMessage(playerid, GREEN,"Your rank is General!");
 }
 else if(GetPlayerScore(playerid) >= 2000)
 {
    SendClientMessage(playerid,GREEN,"Your rank is Commander!");
 }
 return 1;
}



Re: Putting Text Draw in Rank SYstem (rep++) - ViniBorn - 09.04.2012

Can be placed in OnPlayerUpdate


Re: Putting Text Draw in Rank SYstem (rep++) - Kitten - 09.04.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Can be placed in OnPlayerUpdate
Not really an good idea gets called every tick of a second,

i rather do,

pawn Код:
forward OnPlayerUpdateEx(playerid);

SetTimer("OnPlayerUpdateEx",2500,1); // OnGameModeInit

public OnPlayerUpdateEx(playerid)
{
    // your stuff onplayerupdate here
    return 1;
}



Re: Putting Text Draw in Rank SYstem (rep++) - iOmar - 09.04.2012

no i don't want in time. I want That Every time you get team you got this text draw if your rank is private..
I don't get it. It said Invalid Declaration..
Can you give me sample??