A more readable version of this, i'll edit my comment soon.
PHP код:
public OnPlayerSpawn(playerid)
{
ShowZonesForPlayer(playerid);
God_Mode_Verify(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerSpecialAction(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SavePlayer(playerid);
CosminInfo[playerid][AFKBRB] = 0;
CosminInfo[playerid][Spawned] = 1;
TextDrawHideForPlayer(playerid,BRB[0]);
ConnectTDHide(playerid);
PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
if(CosminInfo[playerid][HideTDS] == 0)
TextDrawShowForPlayer(playerid, WES_TD[0]),
TextDrawShowForPlayer(playerid, WES_TD[1]),
TextDrawShowForPlayer(playerid, WES_TD[2]),
TextDrawShowForPlayer(playerid, WES_TD[3]),
TextDrawShowForPlayer(playerid, WES_TD[4]),
TextDrawShowForPlayer(playerid, WES_TD[5]),
TextDrawShowForPlayer(playerid, liTeleTD);
//TextDrawShowForPlayer(playerid, Pont[0]), TextDrawShowForPlayer(playerid, Pont[1]), TextDrawShowForPlayer(playerid, Pont[2]);
//--------------------------------------------------------------------------
SetPlayerCheckpoint(playerid, 1319.1544,1249.3938,10.8203, 2.0);
//--------------------------------------------------------------------------
switch(CosminInfo[playerid][Language])
{
case 0: PlayerTextDrawShow(playerid, Random_TD_Texts);
case 1: PlayerTextDrawShow(playerid, Random_TD_Texts_RO);
}
//--------------------------------------------------------------------------
if(ClanInfo[CosminInfo[playerid][ClanID]][SpawnX] != 0)
{
SetPlayerPos(playerid, ClanInfo[CosminInfo[playerid][ClanID]][SpawnX], ClanInfo[CosminInfo[playerid][ClanID]][SpawnY], ClanInfo[CosminInfo[playerid][ClanID]][SpawnZ]);
SetPlayerFacingAngle(playerid, ClanInfo[CosminInfo[playerid][ClanID]][SpawnA]);
}
//--------------------------------------------------------------------------
if(ClanInfo[CosminInfo[playerid][ClanID]][SpawnX] == 0)
{
new rSpawn = random(; switch(rSpawn)
{
case 0: SetPlayerPos(playerid, -70.0371,2502.8616,16.6314 ); // AA
case 1: SetPlayerPos(playerid, 1942.1929,-2383.1050,13.6628 ); // LSAir
case 2: SetPlayerPos(playerid, -1369.4698,-478.3749,14.2305 ); // SFAir
case 3: SetPlayerPos(playerid, 1315.9774,1277.6951,10.8203 ); // LVAir
case 4: SetPlayerPos(playerid, -2340.3953,-1602.7417,483.7599 ); // Chilliad
case 5: SetPlayerPos(playerid, 1420.3746,2773.9958,11.0972 ); // Stunt Golf
case 6: SetPlayerPos(playerid, -2227.6587,2326.2891,7.5894 ); // Pimps
case 7: SetPlayerPos(playerid, -2639.6819,1356.3484,7.1629 ); // Jizzy's
case 8: SetPlayerPos(playerid, 356.9382,-1840.1594,3.7349 ); // Beach
}
}
//--------------------------------------------------------------------------
if(CosminInfo[playerid][Jailed] != 0)
{
SendClientMessage(playerid, COLOR_ULTRARED, "You cannot escape from Jail! You have to wait a few minutes.");
SetTimerEx("Jailing", 1000, 0, "i", playerid);
}
//--------------------------------------------------------------------------
mysql_tquery(DB_Connect, "SELECT * FROM `Clans`", "LoadClans", "");
//--------------------------------------------------------------------------
if(CosminInfo[playerid][GangID] != 0)
{
SetupPlayerForGang(playerid, CosminInfo[playerid][GangID]);
}
//--------------------------------------------------------------------------
if(CosminInfo[playerid][ClanID] != 0)
{
SetupPlayerForClan(playerid, CosminInfo[playerid][ClanID]);
}
//--------------------------------------------------------------------------
CheckDMInfo(playerid);
SetPlayerScore(playerid, GiveNote(playerid));
//--------------------------------------------------------------------------
return 1;
}
3- Show declarations for all the variables used in this public function.
I.e the variable ClanInfo and the enum used.