SA-MP Forums Archive
help with team score textdraw (+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: help with team score textdraw (+REP) (/showthread.php?tid=364629)



help with team score textdraw (+REP) - markjaysonpinoy - 31.07.2012

help with team score textdraw (+REP) I have 2 teams TERRORIST VS COUNTER TERRORISTS


Re: help with team score textdraw (+REP) - HyDrAtIc - 31.07.2012

Can you add more informations?

like where the textdraw is and how what it is?


Re: help with team score textdraw (+REP) - markjaysonpinoy - 31.07.2012

Liek textdraw on the side with 2 teams

CT: score
T: score


Re: help with team score textdraw (+REP) - markjaysonpinoy - 31.07.2012

BUMP^^^ ANY REPLISE?


Re: help with team score textdraw (+REP) - XStormiest - 31.07.2012

hmm
you will need foreach include

pawn Код:
new Text: Score;
   //in top of script


//under onGameModeInit
    Score = TextDrawCreate(18.000000, 190.000000, "");
    TextDrawBackgroundColor(Score , 255);
    TextDrawFont(Score , 3);
    TextDrawLetterSize(Score , 0.379999, 1.499999);
    TextDrawColor(Score , -1);
    TextDrawSetOutline(Score , 0);
    TextDrawSetProportional(Score , 1);
    TextDrawSetShadow(Score , 1);
    SetTimer("UpdateTimer",20*1000,1);
in top of script
Код:
forward UpdateTimer();
where you want but in not in call back of in top of script
Код:
      public UpdateTimer()
     {
        foreach(Player,i)
             {
                    TextDrawSetString(Score,GetPlayerScore(playerid));
             }
     }
and TextDrawShowForPlayer, TextDrawDestroy and TextDrawHideForPlayer to hide , show , or destroy the textdraw!


Re: help with team score textdraw (+REP) - markjaysonpinoy - 31.07.2012

Quote:
Originally Posted by XStormiest
Посмотреть сообщение
hmm
you will need foreach include

pawn Код:
new Text: Score;
   //in top of script


//under onGameModeInit
    Score = TextDrawCreate(18.000000, 190.000000, "");
    TextDrawBackgroundColor(Score , 255);
    TextDrawFont(Score , 3);
    TextDrawLetterSize(Score , 0.379999, 1.499999);
    TextDrawColor(Score , -1);
    TextDrawSetOutline(Score , 0);
    TextDrawSetProportional(Score , 1);
    TextDrawSetShadow(Score , 1);
    SetTimer("UpdateTimer",20*1000,1);
in top of script
Код:
forward UpdateTimer();
where you want but in not in call back of in top of script
Код:
      public UpdateTimer()
     {
        foreach(Player,i)
             {
                    TextDrawSetString(Score,GetPlayerScore(playerid));
             }
     }
and TextDrawShowForPlayer, TextDrawDestroy and TextDrawHideForPlayer to hide , show , or destroy the textdraw!
Help me? playerid undefined? Thanks so much man! ++REP!

Код:
C:\Users\Mark Jayson\Desktop\samp03e_svr_R2_win32\gamemodes\lvdm.pwn(247) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: help with team score textdraw (+REP) - preda98 - 31.07.2012

put instead of
public UpdateTimer()
THIS:
public UpdateTimer(playerid)
AND THEN CHANGE THAT FORWARD TO:
forward UpdateTimer(playerid);


Re: help with team score textdraw (+REP) - XStormiest - 31.07.2012

sorry put i instead of playerid.. my mistake


Re: help with team score textdraw (+REP) - markjaysonpinoy - 31.07.2012

Thanks dudes but now it gives me the error

error 035: argument type mismatch (argument 2)


Re: help with team score textdraw (+REP) - markjaysonpinoy - 01.08.2012

bump any replies?