so,I downloaded a gamemode this day and set it up.
but,the problem is that when I already logged in/registered and going to spawn,i crashed for no reason.
chatlog:
code:
SetPlayerToSpawn
but,the problem is that when I already logged in/registered and going to spawn,i crashed for no reason.
chatlog:
PHP Code:
[18:26:03] [NOTICE] {AFAFAF}This server contains themes suitable for mature audiences only.
[18:26:14] Incorrect password. You have 2 more attempts before you are kicked.
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15]
[18:26:15] ** MOTD: 8
[18:26:15] You have logged in as a {AFAFAF}level 1 newbie{FFFFFF}.
[18:26:15] Your last login was on the 14th of April, 2017 @ 15:58 (server time).
PHP Code:
if(PlayerInfo[extraid][pAdmin] > 0) {
SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {FF6347}level %i %s{FFFFFF}.", PlayerInfo[extraid][pAdmin], GetAdminRank(extraid));
} else if(PlayerInfo[extraid][pHelper] > 0) {
SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {33CCFF}%s{FFFFFF}.", GetHelperRank(extraid));
} else if(PlayerInfo[extraid][pVIPPackage] > 0) {
SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {A028AD}%s VIP{FFFFFF}.", GetVIPRank(PlayerInfo[extraid][pVIPPackage]));
} else if(PlayerInfo[extraid][pLevel] >= 2) {
SendClientMessageEx(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {AFAFAF}level %i player{FFFFFF}.", PlayerInfo[extraid][pLevel]);
} else {
SendClientMessage(extraid, COLOR_WHITE, "Limitless Roleplay: You have logged in as a {AFAFAF}level 1 newbie{FFFFFF}.");
}
SendClientMessageEx(extraid, COLOR_GREEN, "Your last login was on the %s (server time).", date);
StopAudioStreamForPlayer(extraid);
}
if(PlayerInfo[extraid][pFaction] >= 0 && FactionInfo[PlayerInfo[extraid][pFaction]][fType] == FACTION_NONE)
{
ResetPlayerWeaponsEx(extraid);
SendClientMessageEx(extraid, COLOR_LIGHTRED, "You were either kicked from the faction while offline or it was deleted.");
SetPlayerSkin(extraid, 230);
PlayerInfo[extraid][pFaction] = -1;
PlayerInfo[extraid][pFactionRank] = 0;
PlayerInfo[extraid][pDivision] = -1;
PlayerInfo[extraid][pDuty] = 0;
mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET faction = -1, factionrank = 0, division = -1 WHERE uid = %i", PlayerInfo[extraid][pID]);
mysql_tquery(connectionID, queryBuffer);
}
if(PlayerInfo[extraid][pGang] >= 0 && !GangInfo[PlayerInfo[extraid][pGang]][gSetup])
{
SendClientMessage(extraid, COLOR_LIGHTRED, "You have either been kicked from the gang while offline or it was deleted.");
PlayerInfo[extraid][pGang] = -1;
PlayerInfo[extraid][pGangRank] = 0;
mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE users SET gang = -1, gangrank = 0 WHERE uid = %i", PlayerInfo[extraid][pID]);
mysql_tquery(connectionID, queryBuffer);
}
}
SetPlayerToSpawn(extraid);
}
}
PHP Code:
SetPlayerToSpawn(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
{
SetSpawnInfo(playerid, NO_TEAM, PlayerInfo[playerid][pSkin], 820.540, -1342.6283, 11.5216, 90.0000, 0, 0, 0, 0, 0, 0);
TogglePlayerSpectating(playerid, 0);
}
else
{
if(IsPlayerInAnyVehicle(playerid))
{
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 5.0);
}
SpawnPlayer(playerid);
}
PlayerInfo[playerid][pACTime] = gettime() + 2;
}