21.10.2009, 14:59
Hi again lol. Look at this timers, I dont know why, they repeat the texts that are on callback:
OnPlayerConnect:
So when I load the game, I receive a lot of this messages that dont stop coming:
I think it's a little thing that I forgot, like the last one...
Код:
forward ConnectionText(playerid); public ConnectionText(playerid) { SendClientMessage(playerid, COLOR_LITEGREEN2, " - Welcome to servername -"); SendClientMessage(playerid, COLOR_LITEGREEN, "Register by using /register command"); SendClientMessage(playerid, COLOR_LITEGREEN, "Or login with /login"); SendClientMessage(playerid, COLOR_LITEGREEN2, "- -"); return 1; } forward DatabaseConnection(playerid); public DatabaseConnection(playerid) { SendClientMessage(playerid, COLOR_PURPLE, "Successfully connected to database"); SendClientMessage(playerid, COLOR_PURPLE, "Connecting to game..."); SetTimer("ConnectionText",800,1); return 0; }
Код:
public OnPlayerConnect(playerid) { LoadAntiCheat(playerid); LoadTextDraws(playerid); LoadTimers(playerid); LoadMapIcons(playerid); SetVarsToZero(playerid); new pName[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "%s has joined the server.", pName); SendClientMessageToAll(COLOR_GREY, string); ClearScreen(playerid); SendClientMessage(playerid, COLOR_PURPLE, "Loading database..."); SetTimerEx("DatabaseConnection",900,1); return 1; }
Код:
SendClientMessage(playerid, COLOR_LITEGREEN2, " - Welcome to servername -"); SendClientMessage(playerid, COLOR_LITEGREEN, "Register by using /register command"); SendClientMessage(playerid, COLOR_LITEGREEN, "Or login with /login"); SendClientMessage(playerid, COLOR_LITEGREEN2, "- -");