PHP код:
SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pChar] > 0)
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
}
else
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
}
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
SpawnPaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
return 1;
}
if( GetPVarInt(playerid, "SpecOff" ) == 1 )
{
SetPlayerPos(playerid, GetPVarFloat(playerid, "SpecPosX"), GetPVarFloat(playerid, "SpecPosY"), GetPVarFloat(playerid, "SpecPosZ"));
SetPlayerInterior(playerid, GetPVarInt(playerid, "SpecInt"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "SpecVW"));
SetPVarInt(playerid, "SpecOff", 0 );
SetPVarInt(playerid, "SpecState", -1 );
return 1;
}
if(PlayerInfo[playerid][pTut] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid,0);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SetPlayerPos(playerid, 766.50, -1684.32, -6.86);
SetPlayerCameraPos(playerid, 751.93, -1673.95, 16.01);
SetPlayerCameraLookAt(playerid, 699.55, -1628.93, 5.88);
RegistrationStep[playerid] = 1;
SendClientMessageEx(playerid, COLOR_GREEN, "Please fill in some information to proceed.");
SendClientMessageEx(playerid, COLOR_LIGHTGREEN,"Are you a Male or Female? (Type in what you are).");
SetPlayerVirtualWorld(playerid, 1984);
return 1;
}
new rand;
if(PlayerInfo[playerid][pBeingSentenced] > 0)
{
PhoneOnline[playerid] = 1;
rand = random(sizeof(WarrantJail));
SetPlayerPos(playerid, WarrantJail[rand][0], WarrantJail[rand][1], WarrantJail[rand][2]);
if(rand != 0) courtjail[playerid] = 2;
else courtjail[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}