Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerSpawn(playerid)
- {
- if(!gPlayerLogged[playerid])
- {
- SendClientMessage(playerid, COLOR_RED, "Сервер закрыл соединение! Для выхода из игры введите: {ffffff}/q(uit)");
- return SKick(playerid, 2);
- }
- AC_NoTwoKillFrag[playerid] = false;
- PlayerTextDrawHide(playerid, InfoText[playerid]);
- if(gKilled[playerid] == 1) gKilled[playerid] = 0;
- if(pInfo[playerid][pCash])
- {
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, pInfo[playerid][pCash]);
- }
- ResetDynamicCPs(playerid);
- DisableAllRaceCPs(playerid);
- if(pTemp[playerid][pWork])
- {
- pTemp[playerid][pWork] = 0;
- for(new i; i < 3; i++) PlayerTextDrawHide(playerid, status_work_TD[playerid][i]);
- TextDrawHideForPlayer(playerid,rbTD[0]);
- TextDrawHideForPlayer(playerid,rbTD[1]);
- }
- if(pTemp[playerid][pArmyJob])
- {
- pTemp[playerid][pArmyJob] = 0;
- gCountArmyJob ++;
- SendClientMessage(playerid, COLOR_RED, "Вы покинули территорию и больше не являетесь охранником");
- }
- if(GetPVarInt(playerid, "TaxiPrice") > 0)
- {
- DeletePVar(playerid, "TimeTaxi");
- DeletePVar(playerid, "TaxiPrice");
- DeletePVar(playerid, "PlayerTaxi");
- }
- if(FlyInfo[playerid][fType] == 1) SetPlayerCamera(playerid, 0);
- TogglePlayerControllable(playerid, true);
- TextDrawHideForPlayer(playerid, DartProjectTD[0]);
- TextDrawHideForPlayer(playerid, DartProjectTD[1]);
- SetArmour(playerid, 0);
- if(pInfo[playerid][pHeal] < 10) SetHealth(playerid, 10+random(40));
- else SetHealth(playerid, pInfo[playerid][pHeal]);
- SetHunger(playerid, pInfo[playerid][pHunger]);
- DisablePlayerCheckpoint(playerid);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- if(TeamDuty[playerid])SetPlayerColor(playerid,TeamColors[GetTeamID(playerid)]);
- else SetPlayerColor(playerid,0xFDFCFC15);
- if(IsAGang(playerid))
- {
- SetPlayerColor(playerid,TeamColors[GetTeamID(playerid)]);
- TeamDuty[playerid] = true;
- }
- SetPlayerSkinEx(playerid, GetSkinOfPlayer(playerid));
- if(pInfo[playerid][pFightStyle]) SetPlayerFightingStyle(playerid, pInfo[playerid][pFightStyle]);
- else SetPlayerFightingStyle(playerid, 0);
- if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
- PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
- SetPVarInt(playerid, "K_Times", 0);
- if(CanUse[playerid]>0) CanUse[playerid]=0;
- if(gym_cloakroom[playerid]) gym_cloakroom[playerid] = false;
- SetPlayerSkills(playerid);
- pTemp[playerid][pAbletoGun] = 2;
- new weapid, ammo;
- for (new i;i<13;i++)
- {
- GetPlayerWeaponData(playerid,i,weapid,ammo);
- if(weapid && ammo && gGuns[playerid][i] == weapid && gAmmos[playerid][i] <= ammo)
- {
- GivePlayerWeaponEx(playerid,gGuns[playerid][i],gAmmos[playerid][i]);
- }
- }
- if(GetPVarInt(playerid, "first_spawn"))
- {
- new gun[128];
- GetPVarString(playerid,"mysqlgun",gun,128);
- DeletePVar(playerid,"mysqlgun");
- if(strlen(gun))
- {
- new guns[6],ammos[6],datas[2][56];
- explode(datas,gun,";");
- sscanf(datas[0],"p<|>a<i>[6]",guns);
- sscanf(datas[1],"p<|>a<i>[6]",ammos);
- for(new i;i<6;i++) GivePlayerWeaponEx(playerid,guns[i],ammos[i]);
- }
- PreloadAnimLibAll(playerid);
- DeletePVar(playerid, "first_spawn");
- }
- Delete3DTextLabel(AdminText3D[playerid]); // Администратор на дежурстве
- /* if(pInfo[playerid][pAdmin] >= 1)
- {
- SetPlayerInterior(playerid,1); // Интерьер,если нужно
- SetPlayerPos(playerid, 1625.7827,732.2173,25001.9551); // Координаты,x,y,z
- SetPlayerVirtualWorld(playerid, 1); // Виртуальный мир
- SetPlayerInterior(playerid, 1);
- return true;
- }*/
- new string[128];
- if(pInfo[playerid][Spectating][0] != INVALID_PLAYER_ID)
- {
- SetPlayerPos(playerid, GetPVarFloat(playerid, "SpecX"), GetPVarFloat(playerid, "SpecY"), GetPVarFloat(playerid, "SpecZ"));
- SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "SpecA"));
- SetCameraBehindPlayer(playerid);
- SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "SpecVw"));
- SetPlayerInterior(playerid, GetPVarInt(playerid, "SpecInt"));
- DeletePVar(playerid, "SpecInt");
- DeletePVar(playerid, "SpecVw");
- DeletePVar(playerid, "SpecX");
- DeletePVar(playerid, "SpecY");
- DeletePVar(playerid, "SpecZ");
- DeletePVar(playerid, "SpecA");
- pInfo[playerid][Spectating][0] = pInfo[playerid][Spectating][1] = INVALID_PLAYER_ID;
- SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
- SetPlayerSkin(playerid, GetSkinOfPlayer(playerid));
- return 1;
- }
- if(GetPVarInt(playerid, "Fly_CurrentPlace"))
- {
- SetPlayerPos(playerid, GetPVarFloat(playerid, "CurrentFlyX"), GetPVarFloat(playerid, "CurrentFlyY"), GetPVarFloat(playerid, "CurrentFlyZ"));
- SetCameraBehindPlayer(playerid);
- SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "CurrentFlyVw"));
- SetPlayerInterior(playerid, GetPVarInt(playerid, "CurrentFlyInt"));
- DeletePVar(playerid, "Fly_CurrentPlace");
- DeletePVar(playerid, "CurrentFlyInt");
- DeletePVar(playerid, "CurrentFlyVw");
- DeletePVar(playerid, "CurrentFlyX");
- DeletePVar(playerid, "CurrentFlyY");
- DeletePVar(playerid, "CurrentFlyZ");
- pInfo[playerid][Spectating][0] = pInfo[playerid][Spectating][1] = INVALID_PLAYER_ID;
- SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
- SetPlayerSkin(playerid, GetSkinOfPlayer(playerid));
- return 1;
- }
- if(GetPVarInt(playerid, "Fly_PlaceLaunch"))
- {
- SetPlayerPos(playerid, GetPVarFloat(playerid, "FlyX"), GetPVarFloat(playerid, "FlyY"), GetPVarFloat(playerid, "FlyZ"));
- SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "FlyA"));
- SetCameraBehindPlayer(playerid);
- SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "FlyVw"));
- SetPlayerInterior(playerid, GetPVarInt(playerid, "FlyInt"));
- DeletePVar(playerid, "Fly_PlaceLaunch");
- DeletePVar(playerid, "FlyInt");
- DeletePVar(playerid, "FlyVw");
- DeletePVar(playerid, "FlyX");
- DeletePVar(playerid, "FlyY");
- DeletePVar(playerid, "FlyZ");
- DeletePVar(playerid, "FlyA");
- SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]);
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- if(pInfo[playerid][pWanted]) SetPlayerWantedLevel(playerid, pInfo[playerid][pWanted]);
- SetPlayerSkin(playerid, GetSkinOfPlayer(playerid));
- return 1;
- }
- else if(ClothesRound[playerid] == 1)
- {
- SetPlayerPos(playerid,2265.8601, -2070.6201, 33.9900);
- SetPlayerFacingAngle(playerid,179.6552);
- SetPlayerCameraPos(playerid, 2265.6396, -2076.2761, 36.2578);
- SetPlayerCameraLookAt(playerid, 2265.6914, -2075.2773, 36.1978);
- SetPlayerVirtualWorld(playerid, 1);
- SetPlayerInterior(playerid, 1);
- TogglePlayerControllable(playerid,0);
- for(new i; i < 6; i++) TextDrawShowForPlayer(playerid, gSkinShopDraw[i]);
- SelectTextDraw(playerid, 0xAFAFAFAA);
- SetHealth(playerid, 100.0);
- if(pInfo[playerid][pSex] == 1) SetPlayerSkin(playerid, JoinRegM[SelectCharPlace[playerid]]), ChosenSkin[playerid] = JoinRegM[0];
- else SetPlayerSkin(playerid, JoinRegF[SelectCharPlace[playerid]]), ChosenSkin[playerid] = JoinRegF[0];
- SetPlayerPos(playerid,2265.8601, -2070.6201, 35.0000);
- SetPlayerFacingAngle(playerid,179.6552);
- }
- else if(ClothesRound[playerid] == 2)
- {
- TogglePlayerControllable(playerid,0);
- SetPlayerPos(playerid,2265.8601, -2070.6201, 35.0000);
- SetPlayerFacingAngle(playerid,179.6552);
- SetPlayerCameraPos(playerid, 2265.6396, -2076.2761, 36.2578);
- SetPlayerCameraLookAt(playerid, 2265.6914, -2075.2773, 36.1978);
- SetPlayerVirtualWorld(playerid, playerid);
- SetPlayerInterior(playerid, 1);
- PlayerTextDrawShow(playerid,InfoText[playerid]);
- for(new i; i < 7; i++) TextDrawShowForPlayer(playerid, gSkinShopDraw[i]);
- SelectTextDraw(playerid, 0xAFAFAFAA);
- if(pInfo[playerid][pSex] == 1)
- {
- SelectCharPlace[playerid] = 0;
- SetPlayerSkin(playerid, JoinShopM[SelectCharPlace[playerid]][0]);
- format(string, sizeof(string), "~w~‰E®A: %i", JoinShopM[SelectCharPlace[playerid]][1]);
- }
- else
- {
- SelectCharPlace[playerid] = 0;
- SetPlayerSkin(playerid, JoinShopF[SelectCharPlace[playerid]][0]);
- format(string, sizeof(string), "~w~‰E®A: %i", JoinShopF[SelectCharPlace[playerid]][1]);
- }
- PlayerTextDrawSetString(playerid, InfoText[playerid],string);
- PlayerTextDrawShow(playerid,InfoText[playerid]);
- }
- else if(pInfo[playerid][pJail] == 1)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- SetPlayerPos(playerid, 506.8279,1998.3591,1499.8300, 1);
- SetPlayerFacingAngle(playerid, 356.8666);
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 1);
- SetCameraBehindPlayer(playerid);
- LoadTexture(playerid);
- format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
- GameTextForPlayer(playerid, string, 3000, 3);
- SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
- }
- else if(pInfo[playerid][pJail] == 2)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- SetPlayerPos(playerid, 168.7516,2732.0205,1600.2900, 1);
- SetPlayerFacingAngle(playerid, 88.4073);
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 1);
- LoadTexture(playerid);
- SetCameraBehindPlayer(playerid);
- format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
- GameTextForPlayer(playerid, string, 3000, 3);
- SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
- }
- else if(pInfo[playerid][pJail] == 3)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- SetPlayerPos(playerid, 168.7516,2732.0205,1600.2900, 1);
- SetPlayerFacingAngle(playerid, 88.4073);
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 1);
- SetCameraBehindPlayer(playerid);
- LoadTexture(playerid);
- format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
- GameTextForPlayer(playerid, string, 3000, 3);
- SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
- }
- else if(pInfo[playerid][pJail] == 4)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- SetPlayerPos(playerid,81.1832,1422.5366,501.0000);
- SetPlayerFacingAngle(playerid, 23.2431);
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 1);
- SetCameraBehindPlayer(playerid);
- LoadTexture(playerid);
- format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", pInfo[playerid][pJailTime]);
- GameTextForPlayer(playerid, string, 3000, 3);
- if(pInfo[playerid][pText][3] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (/jailtime)");
- }
- else
- {
- if(!GetString(pInfo[playerid][pJailReason], "None"))
- {
- format(string, sizeof(string), "[Информация] {FFFFFF}Вы были посажены в деморган в оффлайне. Причина: %s (/jailtime)", pInfo[playerid][pJailReason]);
- SendClientMessage(playerid, COLOR_RED, string);
- strmid(pInfo[playerid][pJailReason], "None", 0, strlen("None"), 32);
- MysqlUpdatePlayerStr(playerid, "jailreason", pInfo[playerid][pJailReason]);
- }
- mysql_query_string[0] = EOS;
- format(mysql_query_string, 256, "UPDATE "T_ACCOUNTS" SET text = '%i, %i, %i, 0, %i' WHERE name = '%s'", pInfo[playerid][pText][0], pInfo[playerid][pText][1], pInfo[playerid][pText][2], pInfo[playerid][pText][4], GetName(playerid));
- mysql_tquery(dbHandle, mysql_query_string, "", "");
- }
- }
- else if(PlayerDied[playerid])
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- SetPlayerPos(playerid, 853.3025,-444.2799,1142.8400, 1);
- SetPlayerFacingAngle(playerid, 85.8775);
- SetPlayerVirtualWorld(playerid,1);
- SetPlayerInterior(playerid,1);
- LoadTexture(playerid);
- SetHealth(playerid, 10+random(40));
- SendClientMessage(playerid,COLOR_WHITE,"Вам придется пройти курс лечения или вылечиться у медика. Войдите в палату и делайте процедуру.");
- }
- else if(pInfo[playerid][pHouse] != 0 && pInfo[playerid][pSpawnChange] == 1)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- new i = pInfo[playerid][pHouse], _c = HouseInfo[i][hClass], _i = HouseInfo[i][hInt];
- SetPlayerPos(playerid, HintsInfo[_c][_i][hiExitX], HintsInfo[_c][_i][hiExitY], HintsInfo[_c][_i][hiExitZ], 1);
- SetPlayerFacingAngle(playerid, HintsInfo[_c][_i][hiExitFA]);
- LoadTexture(playerid);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, HintsInfo[_c][_i][hiInt]);
- SetPlayerVirtualWorld(playerid, HouseInfo[i][hID]);
- SetPVarInt(playerid, "UseHouse", i);
- }
- else if(pInfo[playerid][pMember] != 0 && pInfo[playerid][pSpawnChange] == 2)
- {
- SetPlayerPos(playerid, SpawnInfo[pInfo[playerid][pMember]][0], SpawnInfo[pInfo[playerid][pMember]][1], SpawnInfo[pInfo[playerid][pMember]][2], SpawnInfo[pInfo[playerid][pMember]][3]);
- SetPlayerFacingAngle(playerid,SpawnInfo[pInfo[playerid][pMember]][3]);
- LoadTexture(playerid);
- SetPlayerInterior(playerid,SpawnIntWorld[pInfo[playerid][pMember]][0]);
- SetPlayerVirtualWorld(playerid,SpawnIntWorld[pInfo[playerid][pMember]][1]);
- }
- else if(pInfo[playerid][pFamilyMember] != -1 && pInfo[playerid][pSpawnChange] == 3)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- SetPlayerFacingAngle(playerid,FamilyInfo[pInfo[playerid][pFamilyMember]][famSpawn_A]);
- LoadTexture(playerid);
- SetPlayerInterior(playerid,FamilyInfo[pInfo[playerid][pFamilyMember]][famInterior]);
- SetPlayerVirtualWorld(playerid,FamilyInfo[pInfo[playerid][pFamilyMember]][famVirtalWorld]);
- SetPlayerPos(playerid, FamilyInfo[pInfo[playerid][pFamilyMember]][famSpawn_X], FamilyInfo[pInfo[playerid][pFamilyMember]][famSpawn_Y], FamilyInfo[pInfo[playerid][pFamilyMember]][famSpawn_Z], 1);
- SetPVarInt(playerid, "UseHouse", FamilyInfo[pInfo[playerid][pFamilyMember]][famHouse]);
- }
- else if(pInfo[playerid][pMember] >= 1 && pInfo[playerid][pSpawnChange] == 0 || pInfo[playerid][pMember] == 0)
- {
- TogglePlayerControllable(playerid, 0); // Замораживаем игрока
- switch(random(2))
- {
- //ЖД-Вокзал
- case 0:
- {
- SetPlayerPos(playerid, 2515.5547,-2119.0225,24.1524);
- SetPlayerFacingAngle(playerid, 270.0000);
- }
- case 1:
- {
- SetPlayerPos(playerid, 1821.8353,2525.3674,15.8179);
- SetPlayerFacingAngle(playerid, 130.0345);
- }
- }
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- gPlayerSpawned[playerid] = true;
- StopAudioStreamForPlayer(playerid); // музыка при входе
- TextDrawHideForPlayer(playerid, Privet[0]); // приветствие
- TextDrawHideForPlayer(playerid, Privet[1]); // приветствие
- TextDrawHideForPlayer(playerid, Privet[2]); // приветствие
- TextDrawHideForPlayer(playerid, Privet[3]); // приветствие
- TextDrawHideForPlayer(playerid, Polosa[0]);
- TextDrawHideForPlayer(playerid, Polosa[1]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement