15.12.2013, 09:46
Hey!
I've ran into a serious, and very weird issue in my SA-MP code, for some reason, when I join the server, and spawn, the callback doesn't fire properly, or I don't even know what, the code placed under the callback isn't firing.
However, sometimes when I spawn after logging in (It's an automatic login system, using IP comparisons), the callback will fire for me, and me only, but for anybody else who joins the server, it will NOT work for them, I have printed debug information to the console, including In-Game messages as-well, below is the code that is executed under OnPlayerSpawn.
This issue is URGENT, and I need help fixing it, not to be offensive, but please respond with great detail and if anybody else has experienced this, I'd love to hear your workarounds for the issue!
I've ran into a serious, and very weird issue in my SA-MP code, for some reason, when I join the server, and spawn, the callback doesn't fire properly, or I don't even know what, the code placed under the callback isn't firing.
However, sometimes when I spawn after logging in (It's an automatic login system, using IP comparisons), the callback will fire for me, and me only, but for anybody else who joins the server, it will NOT work for them, I have printed debug information to the console, including In-Game messages as-well, below is the code that is executed under OnPlayerSpawn.
This issue is URGENT, and I need help fixing it, not to be offensive, but please respond with great detail and if anybody else has experienced this, I'd love to hear your workarounds for the issue!
pawn Код:
public OnPlayerSpawn(playerid)
{
printf("[DEBUG] OnPlayerSpawn: Firing Callback now!");
new count = GetTickCount();
pInfo[playerid][pSpawned] = 1;
if(pInfo[playerid][pLogged] == 1)
{
format(msg, sizeof(msg), "{FFFFFF}[{FF0000} AdmWarn {FFFFFF}] {A8DBFF}» {%06x}%s(%i) {FFFFFF}has spawned!", pInfo[playerid][pColor], GetName(playerid), playerid);
SendMessageToAdmins(COLOR_RED, msg);
if(UseMySQLSaving == false)
{
SCM(playerid, COLOR_RED, "{FFFFFF}[ {FF0000}AdmWarn {FFFFFF}] {A8DBFF}» {ADADAD}The server is currently using it's backup account saving system");
}
else
{
SCM(playerid, COLOR_RED, "{FFFFFF}[ {FF0000}AdmWarn {FFFFFF}] {A8DBFF}» {ADADAD}The server is currently using the main account saving system.");
}
}
printf("[DEBUG] OnPlayeSpawn: Firing callback tood %d milliseconds", GetTickCount() - count);
return 1;
}