04.11.2016, 07:27
(
Последний раз редактировалось RoboN1X; 04.11.2016 в 08:19.
)
Try this:
EDIT: Of course, you have to declare new OnlineRecordTD[] as global as well.
Sorry for my bad english.
Код:
new PlayersOnline; public OnGameModeInit() { OnlineRecordTD[2] = TextDrawCreate(112.666671, 290.551269, "0"); TextDrawLetterSize(OnlineRecordTD[2], 0.400000, 1.600000); TextDrawAlignment(OnlineRecordTD[2], 1); TextDrawColor(OnlineRecordTD[2], 16777215); TextDrawSetShadow(OnlineRecordTD[2], 0); TextDrawSetOutline(OnlineRecordTD[2], 0); TextDrawBackgroundColor(OnlineRecordTD[2], 255); TextDrawFont(OnlineRecordTD[2], 1); TextDrawSetProportional(OnlineRecordTD[2], 1); TextDrawSetShadow(OnlineRecordTD[2], 0); return 1; } public OnPlayerConnect(playerid) { if(!IsPlayerNPC(playerid)) { new pcount[5]; valstr(pcount, ++PlayersOnline); TextDrawSetString(OnlineRecordTD[2], pcount); TextDrawShowForPlayer(playerid, OnlineRecordTD[2]); } return 1; } public OnPlayerDisconnect(playerid, reason) { if(!IsPlayerNPC(playerid)) { new pcount[5]; valstr(pcount, --PlayersOnline); TextDrawSetString(OnlineRecordTD[2], pcount); } return 1; }
Sorry for my bad english.