Textdraw List |Help|
#5

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
pawn Код:
//create a checkpoint with steamer plugin and add a callback OnPlayerEnterDynamicCP(playerid, checkpointid);
//instead of OnPlayerEnterCheckpoint();

new text_classification[5] = {
       Text:Evacplayer1,
       Text:Evacplayer2,
       Text:Evacplayer3,
       Text:Evacplayer4,
       Text:Evacplayer5
};

new classifications[MAX_PLAYERS][5];

//OnPlayerEnterDynamicCP(playerid, checkpointid);

if(checkpointid == evac){
   for(new i = 0; i < 5; i++){
       if(classifications[playerid][i] != 0)continue;
       classifications[playerid][i] += 1;
       TextDrawSetString(text_classification[i],PlayerName(playerid));
       break;
   }
}
Got error: error 008: must be a constant expression; assumed zero
In OnPlayerEnterDynamicCP:
PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
team[playerid] == TEAM_HUMAN)
    {
        new 
string[256];
        
SetPlayerInterior(playerid,3);
        
SetPlayerPos(playerid,963.9642,-53.1761,1001.1246);
        
format(string,sizeof(string), ""chat""COL_YELLOW" %s made it to evacuation point and has received 3 Coins and 300 XP!",PlayerName(playerid));
        
SendClientMessageToAll(-1,string);
        
DisablePlayerCheckpoint(playerid);
        
CurePlayer(playerid);
        
GivePlayerXP(playerid,300);
        
pInfo[playerid][pEvac]++;
        
pInfo[playerid][pCoins] += 3;
        
SetPlayerColor(playerid,COLOR_YELLOW);
        
TextDrawSetString(Evacplayers,"5 Players that reached Evac:");
        
TextDrawSetString(Allevacplayers,"Player: 1 Player: 2 Player: 3 Player: 4 Player: 5");
        
TextDrawSetString(Evacplayer1,"None");
        
TextDrawSetString(Evacplayer1l,"------------------------------------------");
        
TextDrawSetString(Evacplayer2,"None");
        
TextDrawSetString(Evacplayer2l,"------------------------------------------");
        
TextDrawSetString(Evacplayer3,"None");
        
TextDrawSetString(Evacplayer3l,"------------------------------------------");
        
TextDrawSetString(Evacplayer4,"None");
        
TextDrawSetString(Evacplayer4l,"------------------------------------------");
        
TextDrawSetString(Evacplayer5,"None");
        
TextDrawSetString(Evacplayer5l,"------------------------------------------");
        
TextDrawSetString(Evacnexus,"Nexus Apocalypse");
for(new 
05i++){
       if(
classifications[playerid][i] != 0)continue;
       
classifications[playerid][i] += 1;
       
TextDrawSetString(text_classification[i],PlayerName(playerid));
       }
    }
    return 
1;

Up:
PHP код:
new Text:Evacplayers;
new 
Text:Allevacplayers;
new 
Text:Evacplayer1;
new 
Text:Evacplayer1l;
new 
Text:Evacplayer2;
new 
Text:Evacplayer2l;
new 
Text:Evacplayer3;
new 
Text:Evacplayer3l;
new 
Text:Evacplayer4;
new 
Text:Evacplayer4l;
new 
Text:Evacplayer5;
new 
Text:Evacplayer5l;
new 
Text:Evacnexus
PHP код:
new text_classification[5] =
{
       
Text:Evacplayer1,
       
Text:Evacplayer2,
       
Text:Evacplayer3,
       
Text:Evacplayer4,
       
Text:Evacplayer5
}; 
Reply


Messages In This Thread
Textdraw List |Help| - by s0ZNIz - 02.12.2014, 20:50
Re: Textdraw List |Help| - by iiNzTicTx - 02.12.2014, 21:00
Re: Textdraw List |Help| - by s0ZNIz - 03.12.2014, 04:12
Re: Textdraw List |Help| - by Galletziz - 03.12.2014, 04:44
Re: Textdraw List |Help| - by s0ZNIz - 03.12.2014, 13:13
Re: Textdraw List |Help| - by s0ZNIz - 03.12.2014, 15:50
Re: Textdraw List |Help| - by Galletziz - 03.12.2014, 16:11
Re: Textdraw List |Help| - by s0ZNIz - 03.12.2014, 16:34
Re: Textdraw List |Help| - by Galletziz - 03.12.2014, 16:39
Re: Textdraw List |Help| - by s0ZNIz - 03.12.2014, 16:42

Forum Jump:


Users browsing this thread: 2 Guest(s)