SA-MP Forums Archive
run text draw to all players - 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: run text draw to all players (/showthread.php?tid=291196)



run text draw to all players - marik1322 - 18.10.2011

Sorry for the inconvenience
but is that possible?

i have that thing
PHP код:
    GermanyPoints[playerid] ++; 
but i want to do that the command will run on all players
no [playerid] because i have text draw that shows the germany points
and it always upgrade when germany soldier kill russian soldier
i need that the textdraw will work on all germany killers (it will be common points)
PHP код:
if(gTeam[killerid] == Germany)
{
        if(
gTeam[playerid] == Russia)
        {
           
             new 
newtext[41];
             
GermanyPoints[playerid] ++;//here the problem 
             
TextDrawHideForAll(Textdraw6);
         
format(newtextsizeof(newtext), "Points:%d"GermanyPoints[playerid]);
             
TextDrawSetString(Textdraw6newtext);
             
TextDrawShowForAll(Textdraw6);   
            return 
1;
        }




Re: run text draw to all players - muhib777 - 18.10.2011

I am not sure but ain't it

Код:
new GermanyPoints[playerid] ++;



Re: run text draw to all players - brett7 - 18.10.2011

Why do you hide the textdraw? setting the string means you don't need to reload it.


Re: run text draw to all players - marik1322 - 19.10.2011

ok tnx i didn't know that


Re: run text draw to all players - Johndaonee - 19.10.2011

Not sure if I understood what you wanted but what try this, this is what I understood.

Delete the current new GermanyPoints[MAX_PLAYERS]; you have and change it out with this, then it wont use playerids as you asked for

new GermanyPoints;


GermanyPoints++;
format(newtext, sizeof(newtext), "Points:%d", GermanyPoints);