03.09.2016, 17:12
PHP код:
new score[MAX_PLAYERS]
new scoreS[128][MAX_PLAYERS];
new Text:scoreT[MAX_PLAYERS];
new players;
public OnPlayerConnect(playerid)
{
players++;
scoreT[playerid] = TextDrawCreate(320.000091, 426.000009 +(players * 10), scoreS[playerid]);
TextDrawLetterSize(scoreT[playerid], 0.699998, 2.000000);
TextDrawAlignment(scoreT[playerid], 1);
TextDrawColor(scoreT[playerid], -16776961);
TextDrawSetShadow(scoreT[playerid], 0);
TextDrawSetOutline(scoreT[playerid], -1);
TextDrawBackgroundColor(scoreT[playerid], 51);
TextDrawFont(scoreT[playerid], 1);
TextDrawSetProportional(scoreT[playerid], 1);
return 1;
}
public OnPlayerUpdate(playerid)
{
format(scoreS[playerid],128,"%i",score[playerid]);
TextDrawSetString(scoreT[playerid],scoreS[playerid]);
return 1;
}
CMD:show(playerid,params[])
{
for(new i=0,i<MAX_PLAYERS;i++)
{
TextDrawShowForPlayer(playerid,scoreT[i]);
}
return 1;
}
//Everything works fine but the sever connection is closed after using /show command. It say you are banned from //this sever