PHP код:
public OnPlayerSpawn(playerid)
{
if ( GetPVarInt ( playerid, "Logged" ) == 0 )return SendClientMessage ( playerid, COLOR_GRAY, "{FF0000}‹‹ {FFFFFF}Извините, но этот сервер требует залогинится перед тем как войти в игру.Вы кикнуты {FF0000}››" ) , KickEx ( playerid ) ? 0 : 0 ;
SetPVarInt(playerid, "AntiBreik", 3);
MyResetPlayerWeapons(playerid);
pTemp[playerid][pAbletoGun] = 2;
SetPlayerScore ( playerid, PLAYER [ playerid ] [ AGE ] ) ;
MySetPlayerHealth( playerid, 100.0 ) ;
MySetPlayerArmour( playerid, 0.0 ) ;
piss = CreateProgressBar(518.00, 101.00, 70.50, 3.50, -1048321, 100.0);
SetProgressBarValue(piss, PLAYER[playerid][HEALTH]);
UpdateProgressBar(piss, playerid);
sleeping = CreateProgressBar(518.00, 109.00, 70.50, 3.20, 8900346, 100.0);
SetProgressBarValue(sleeping, PLAYER[playerid][HEALTH]);
UpdateProgressBar(sleeping, playerid);
eat = CreateProgressBar(518.00, 117.00, 70.50, 3.20, 11908533, 100.0);
SetProgressBarValue(eat, PLAYER[playerid][HEALTH]);
UpdateProgressBar(eat, playerid);
new fid;
if (PLAYER[playerid][JAIL])
{
fid = ReturnFractionIndexForId ( PLAYER [ playerid ] [ FRACID ] ) ;
new camid = random(3);
MySetPlayerPos(playerid,camSpawn[camid][0],camSpawn[camid][1],camSpawn[camid][2],camSpawn[camid][3],6,1);
if(PLAYER[playerid][FRACID]) SetPlayerSkin(playerid,268);else SetPlayerSkin(playerid, 268); SetPlayerColor ( playerid, COLOR_LOGGED );
if(PLAYER[playerid][FRACID])SetPlayerColor(playerid,FRACTION [ fid ] [ fColor ]);
SetPVarInt ( playerid, "Death", 0 ) ;
SetPVarInt ( playerid, "Spawn", 1 ) ;
SetPVarInt(playerid, "LicExam", 0);
return true;
}
else if(pTemp[playerid][pDead])
{
pTemp[playerid][pDead] = false;
new Float:c[4][4] = {
{1317.6062,-826.5536,1185.7059,90.0725},
{1306.8513,-819.0848,1185.7059,359.0601},
{1335.7402,-826.0469,1185.7059,270.6992},
{1353.0658,-825.9440,1185.7059,88.8192}
};
new f = RandomEx(0,4);
pTemp[playerid][pInHospital] = true;
MySetPlayerPos(playerid,c[f][0],c[f][1],c[f][2],c[f][3],1,0);
fid = ReturnFractionIndexForId ( PLAYER [ playerid ] [ FRACID ] ) ;
if(PLAYER[playerid][FRACID])
{
if(PLAYER[playerid][SEX] == 1)SetPlayerSkin(playerid,FRACTION [ fid ][ fSkins ][ PLAYER [ playerid ] [ RANK ] ]);
else SetPlayerSkin(playerid,FRACTION [ fid ][ fGirlskin ]);
}
else SetPlayerSkin(playerid,PLAYER[playerid][SKIN]);
MySetPlayerHealth(playerid,3.0);
SetPVarInt ( playerid, "Death", 0 ) ;
SetPVarInt ( playerid, "Spawn", 1 ) ;
SetPVarInt(playerid, "LicExam", 0);
return true;
}
if ( PLAYER [ playerid ] [ FRACID ] != 0 )
{
fid = ReturnFractionIndexForId ( PLAYER [ playerid ] [ FRACID ] ) ;
SetPlayerColor ( playerid, FRACTION [ fid ] [ fColor ] ) ;
if(PLAYER[playerid][FRACID])
{
if(PLAYER[playerid][SEX] == 1)SetPlayerSkin(playerid,FRACTION [ fid ][ fSkins ][ PLAYER [ playerid ] [ RANK ] ]);
else SetPlayerSkin(playerid,FRACTION [ fid ][ fGirlskin ]);
}
else SetPlayerSkin(playerid,PLAYER[playerid][SKIN]);
}
else
{
SetPlayerColor ( playerid, COLOR_LOGGED ) ;
SetPlayerSkin( playerid, PLAYER[playerid][SKIN]) ;
}
if ( PLAYER [ playerid ] [ HOUSE ] != 0 || PLAYER [ playerid ] [ RENTROOM ] != 0 && PLAYER[playerid][SPAWN] == 1)
{
new h = ReturnHouseIndexForId ( ( PLAYER [ playerid ] [ HOUSE ] != 0 ) ? PLAYER [ playerid ] [ HOUSE ] : PLAYER [ playerid ] [ RENTROOM ] ) ;
new hint = HOUSES [ h ] [ hInt ] ;
MySetPlayerPos ( playerid, HouseInt [ hint ] [ Position ] [ 0 ] , HouseInt [ hint ] [ Position ] [ 1 ], HouseInt [ hint ] [ Position ] [ 2 ], HouseInt [ hint ] [ Position ] [ 3 ], HouseInt [ hint ] [ Int ], HOUSES [ h ] [ hID ] + 1000 ) ;
}
else if ( PLAYER [ playerid ] [ FRACID ] != 0 )MySetPlayerPos ( playerid, FRACTION [ fid ][ fSpawn ] [ 0 ], FRACTION [ fid ][ fSpawn ] [ 1 ], FRACTION [ fid ][ fSpawn ] [ 2 ], FRACTION [ fid ][ fSpawn ] [ 3 ], FRACTION [ fid ][ fSpawnInt ], FRACTION [ fid ][ fSpawnVirt ] ) ;
else MySetPlayerPos ( playerid, 1568.0466,-1897.0621,13.5607,0.2485, 0, 0 );
SetPVarInt ( playerid, "Death", 0 ) ;
SetPVarInt ( playerid, "Spawn", 1 ) ;
SetPVarInt(playerid, "LicExam", 0);
if(PLAYER[playerid][SEX] == 0 )MyShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_LIST,"{1e90ff}Пол","[1]Мужской\n[2]Женский","Выбрать","");
return true;
}