SA-MP Forums Archive
Textdraw Problems - 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: Textdraw Problems (/showthread.php?tid=579604)



Textdraw Problems - Toxik - 28.06.2015

Sup guys i got those Codes for textdraw witch show up when someone spawn
Server info etc etc
pawn Код:
//the code im using to show em so i dont use Whole Stuff like ,1,2,3,4,5
new Text:Spawn[6];

//On Spawn
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, Spawn[0]);
    TextDrawShowForPlayer(playerid, Spawn[1]);
    TextDrawShowForPlayer(playerid, Spawn[2]);
    TextDrawShowForPlayer(playerid, Spawn[3]);
    TextDrawShowForPlayer(playerid, Spawn[4]);
    TextDrawShowForPlayer(playerid, Spawn[5]);
        return 1;
//How can i make the codes all in one like
//when i add this down here without the up codes i get the error
       TextDrawShowForPlayer(playerid, Spawn[i]);
//C:\Users\CraTzy\Desktop\LVDM\gamemodes\LVDM.pwn(2080) : error 017: undefined symbol "i"

}



Re: Textdraw Problems - Jonny5 - 28.06.2015

pawn Код:
for(new i = 0;i<6;i++)
{
 TextDrawShowForPlayer(playerid, Spawn[i]);
}



Respuesta: Textdraw Problems - [DOG]irinel1996 - 28.06.2015

PHP код:
for (new 0<= 5i++) {
    
TextDrawShowForPlayer(playeridSpawn[i]);

or
PHP код:
new 0;
while(
<= 5) {
    
TextDrawShowForPlayer(playeridSpawn[i]);
    
i++;

EDIT: ups... too slow.


Re: Textdraw Problems - Toxik - 28.06.2015

thanks +rep Both