03.12.2014, 13:13
Quote:
pawn Код:
|
In OnPlayerEnterDynamicCP:
PHP код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
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 i = 0; i < 5; i++){
if(classifications[playerid][i] != 0)continue;
classifications[playerid][i] += 1;
TextDrawSetString(text_classification[i],PlayerName(playerid));
}
}
return 1;
}
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
};