

|
OnPlayerConnect is skipped and it sends you to OnPlayerRequestClassSelection
Post your OnPlayerConnect code |
public OnPlayerConnect(playerid)
{
ResetPlayer(playerid);
PreloadAnimations(playerid);
SetPlayerColor(playerid, 0xAFAFAFFF);
SetPlayerTeam(playerid, PLAYER_STATE_ALIVE);
//Dualies;
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 899);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 0);
new
existCheck[60]
;
mysql_format(ourConnection, existCheck, sizeof(existCheck), "SELECT * FROM bannedlist WHERE IpAddress = '%e'", ReturnIP(playerid));
mysql_tquery(ourConnection, existCheck, "CheckBanList", "i", playerid);
// We'll check if their IP is linked to any players on the bannedlist.
// A master account DBID ban will be checked once they login.
SetPlayerCamera(playerid);
//Unscrambler Textdraws:
Unscrambler_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 199.873275, 273.593383, "<UNSCRAMBLED_WORD>");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][0], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][0], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][0], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][0], 0);
Unscrambler_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 137.369461, 273.593383, "/unscramble");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][1], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][1], -490707969);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][1], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][1], 0);
Unscrambler_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 305.179687, 273.593383, "TO_UNSCRAMBLE_THE_WORD");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][2], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][2], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][2], -2147483393);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][2], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][2], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][2], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][2], 0);
Unscrambler_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 141.369705, 285.194091, "scrambledword");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][3], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][3], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][3], -1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][3], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][3], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][3], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][3], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][3], 0);
Unscrambler_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 137.902801, 296.924377, "YOU_HAVE");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][4], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][4], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][4], -2147483393);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][4], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][4], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][4], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][4], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][4], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][4], 0);
Unscrambler_PTD[playerid][5] = CreatePlayerTextDraw(playerid, 184.539016, 297.024383, "001");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][5], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][5], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][5], -1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][5], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][5], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][5], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][5], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][5], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][5], 0);
Unscrambler_PTD[playerid][6] = CreatePlayerTextDraw(playerid, 202.540191, 297.124389, "SECONDS_LEFT_TO_FINISh.");
PlayerTextDrawLetterSize(playerid, Unscrambler_PTD[playerid][6], 0.206330, 1.118813);
PlayerTextDrawAlignment(playerid, Unscrambler_PTD[playerid][6], 1);
PlayerTextDrawColor(playerid, Unscrambler_PTD[playerid][6], -2147483393);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][6], 0);
PlayerTextDrawSetOutline(playerid, Unscrambler_PTD[playerid][6], 1);
PlayerTextDrawBackgroundColor(playerid, Unscrambler_PTD[playerid][6], 255);
PlayerTextDrawFont(playerid, Unscrambler_PTD[playerid][6], 2);
PlayerTextDrawSetProportional(playerid, Unscrambler_PTD[playerid][6], 1);
PlayerTextDrawSetShadow(playerid, Unscrambler_PTD[playerid][6], 0);
//Plate Textdraw:
CarBought_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 97.333351, 291.629669, "YOUR_NEW_PLATE_HAS_BEEN_SET");
PlayerTextDrawLetterSize(playerid, CarBought_PTD[playerid][0], 0.248666, 1.259851);
PlayerTextDrawAlignment(playerid, CarBought_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, CarBought_PTD[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, CarBought_PTD[playerid][0], 1);
PlayerTextDrawBackgroundColor(playerid, CarBought_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, CarBought_PTD[playerid][0], 2);
PlayerTextDrawSetProportional(playerid, CarBought_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][0], 0);
CarBought_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 97.533348, 302.630340, "PLATEHERE");
PlayerTextDrawLetterSize(playerid, CarBought_PTD[playerid][1], 0.248666, 1.259851);
PlayerTextDrawAlignment(playerid, CarBought_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, CarBought_PTD[playerid][1], -490707969);
PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, CarBought_PTD[playerid][1], 1);
PlayerTextDrawBackgroundColor(playerid, CarBought_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, CarBought_PTD[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, CarBought_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, CarBought_PTD[playerid][1], 0);
return 1;
}
|
Show me "SetPlayerCamera" custom function and "CheckBanList" callback
|
function:CheckBanList(playerid)
{
if(!cache_num_rows())
{
new existCheck[129];
mysql_format(ourConnection, existCheck, sizeof(existCheck), "SELECT acc_dbid FROM masters WHERE acc_name = '%e'", ReturnName(playerid));
mysql_tquery(ourConnection, existCheck, "LogPlayerIn", "i", playerid);
}
else
{
SendServerMessage(playerid, "Your IP \"%s\" is banned from our servers.", ReturnIP(playerid));
SendServerMessage(playerid, "You may appeal your ban on our forums.");
return KickEx(playerid);
}
return 1;
}
function:SetPlayerCamera(playerid)
{
new rand = random(3);
switch(rand)
{
case 0:
{
SetPlayerCameraPos(playerid, 1249.3018, -1697.8046, 99.9554);
SetPlayerCameraLookAt(playerid, 1249.6576, -1696.8656, 99.4902);
}
case 1:
{
SetPlayerCameraPos(playerid, 2151.2539, -1894.5447, 85.3924);
SetPlayerCameraLookAt(playerid, 2150.5833, -1893.8066, 84.6774);
}
case 2:
{
SetPlayerCameraPos(playerid, 2169.0635, -1740.4182, 112.0308);
SetPlayerCameraLookAt(playerid, 2170.0603, -1740.3655, 111.3108);
}
}
return 1;
}