05.02.2014, 11:50
(
Последний раз редактировалось CuervO; 06.02.2014 в 03:41.
)
pawn Код:
new joinorder = 0;
new JoinText[4][38];
public OnPlayerConnect(playerid)
{
if(joinorder == 3)
{
for(new i = 2; i >= 0; i --)
{//descending loop starting from 2.
//This will put whatever it was in 2 at 3, 1 at 2 and 0 at 1.
TextDrawSetString(JoinPart[i+1], JoinText[i]);
format(JoinText[i+1], 38, "%s", JoinText[i]);
}
joinorder = 0; //reset variable.
}
format(JoinText[joinorder],38,"~G~JOIN: ~w~%s.", PlayerName(playerid)); //assuming you've got this stock, otherwise create it.
TextDrawSetString(JoinPart[joinorder], JoinText[joinorder]);
joinorder ++;
return 1;
}
public OnPlayerDisconnect(playerid)
{
if(joinorder == 3)
{
for(new i = 2; i >= 0; i --)
{//descending loop starting from 2.
//This will put whatever it was in 2 at 3, 1 at 2 and 0 at 1.
TextDrawSetString(JoinPart[i+1], JoinText[i]);
format(JoinText[i+1], 38, "%s", JoinText[i]);
}
joinorder = 0; //reset variable.
}
format(JoinText[joinorder],38,"~r~PART: ~w~%s.", PlayerName(playerid)); //assuming you've got this stock, otherwise create it.
TextDrawSetString(JoinPart[joinorder], JoinText[joinorder]);
joinorder ++;
return 1;
}