27.04.2013, 06:07
Какой хостинг не беру, везде почти мод лагает, или же долгий спавн идет.
Помогите пожалуйста решить проблему.
Код HTML:
stock SetPlayerSpawn(playerid) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid,0xBBBBBBAA); new house = PlayerInfo[playerid][pPHousekey]; if(PlayerInfo[playerid][pChosingSkin] == 0) { SetPlayerInterior(playerid, 0); SetPlayerHealthAC(playerid, 100); PlayerInfo[playerid][php] = 100; SetPlayerInterior(playerid, 0); SetPlayerCameraPos(playerid, -1817.0808, 1112.9937, 235.4244); SetPlayerCameraLookAt(playerid, -1816.5471, 949.6590, 235.4244); SPD(playerid, 4, DIALOG_STYLE_MSGBOX, " ", "Какого пола будет ваш персонаж:\n", "Мужчина", "Женщина"); return true; } if(PlayerInfo[playerid][pWantedLevel] >= 1) { WantedPoints[playerid] = PlayerInfo[playerid][pWantedLevel]; WantedLevel[playerid] = PlayerInfo[playerid][pWantedLevel]; SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]); } SetPlayerToTeamColor(playerid); if(PlayerPaintballing[playerid] != 0) { new rand; new rands = random(sizeof(paintgun)); GiveWeapon(playerid, paintgun[rands], 9999); rand = random(sizeof(PaintballSpawns)); SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerColor(playerid, COLOR_REDD); SetPlayerArmourAC(playerid, 100); return true; } if(PlayerInfo[playerid][pJailed] == 1) { if(PlayerInfo[playerid][pPlaceJail] == 1) { SetPlayerInterior(playerid, 6); SetPlayerPos(playerid, 264.1425, 77.4712, 1001.0391); SetPlayerFacingAngle(playerid, 263.0160); return true; } if(PlayerInfo[playerid][pPlaceJail] == 2) { SetPlayerInterior(playerid, 10); SetPlayerPos(playerid, 219.5400, 109.9767, 999.0156); SetPlayerFacingAngle(playerid, 1.0000); return true; } if(PlayerInfo[playerid][pPlaceJail] == 3) { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 198.3642, 161.8103, 1003.0300); SetPlayerFacingAngle(playerid, 1.0000); return true; } } if(PlayerInfo[playerid][pJailed] == 4) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 5508.3706, 1244.7594, 23.1886); return true; } if(house != 999) { if(SpawnChange[playerid]) { SetPlayerInterior(playerid, HouseInfo[house][hInt]); SetPlayerVirtualWorld(playerid, house+50); SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity], HouseInfo[house][hExitz]); PlayerInfo[playerid][pInt] = HouseInfo[house][hInt]; return true; } } switch(PlayerInfo[playerid][pMember]) { case 1: { SetPlayerInterior(playerid, 6); SetPlayerPos(playerid, 235.8750, 73.5106, 1005.0391); PlayerInfo[playerid][pInt] = 6; SetPlayerVirtualWorld(playerid, 0); return true; } case 2: { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 219.3897,168.6978,1003.0234); SetPlayerFacingAngle(playerid, 181.4319); SetPlayerVirtualWorld(playerid, 5); return true; } case 3: { if(forma[playerid] == 1) { SetPlayerSkin(playerid, 252); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, -1346.2050, 492.3983, 11.2027); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); return true; } SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, -1346.2050, 492.3983, 11.2027); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); return true; } case 4: { SetPlayerInterior(playerid, 15); SetPlayerVirtualWorld(playerid, 3); SetPlayerPos(playerid, 372.0985, -53.2946, 1076.4708); SetPlayerFacingAngle(playerid, 90.0000); return true; } case 7: { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 358.5969, 207.5322, 1008.3828); SetPlayerFacingAngle(playerid, 182.7769); PlayerInfo[playerid][pInt] = 3; SetPlayerVirtualWorld(playerid, 0); return true; } case 8: { SetPlayerInterior(playerid, 1); SetPlayerPos(playerid, 2151.4502, 1602.8522, 1006.1752); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); SetPlayerFacingAngle(playerid, 269.7087); SetPlayerVirtualWorld(playerid, 0); return true; } case 9: { SetPlayerInterior(playerid, 15); SetPlayerPos(playerid, 997.6838, 1005.4717, 1999.7999); SetPlayerFacingAngle(playerid, 270.0000); SetPlayerVirtualWorld(playerid, 2); return true; } case 10: { SetPlayerInterior(playerid, 10); SetPlayerPos(playerid, 221.2526, 111.5752, 1010.2118); SetPlayerFacingAngle(playerid, 268.9050); PlayerInfo[playerid][pInt] = 10; return true; } case 11: { SetPlayerPos(playerid, -2031.7778, -117.3789, 1035.1719); SetPlayerFacingAngle(playerid, 268.5241); SetPlayerInterior(playerid,3); PlayerInfo[playerid][pInt] = 3; SetPlayerVirtualWorld(playerid, 1); return true; } case 16: { SetPlayerInterior(playerid, 15); SetPlayerPos(playerid, 997.6838, 1005.4717, 1999.7999); SetPlayerFacingAngle(playerid, 270.0000); SetPlayerVirtualWorld(playerid, 1); return true; } case 19: { if(forma[playerid] == 1) { SetPlayerSkin(playerid, 252); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 241.7503, 1852.6790, 8.7578); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); return true; } SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 241.7503, 1852.6790, 8.7578); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); return true; } case 20: { SetPlayerInterior(playerid, 15); SetPlayerPos(playerid, 997.6838, 1005.4717, 1999.7999); SetPlayerFacingAngle(playerid, 270.0000); SetPlayerVirtualWorld(playerid, 3); return true; } case 21: { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 211.3636, 184.3113, 1003.0313); SetPlayerFacingAngle(playerid, 174.3579); PlayerInfo[playerid][pInt] = 122; SetPlayerVirtualWorld(playerid, 122); return true; } case 22: { SetPlayerInterior(playerid, 15); SetPlayerVirtualWorld(playerid, 4); SetPlayerPos(playerid, 372.0985, -53.2946, 1076.4708); SetPlayerFacingAngle(playerid, 90.0000); return true; } case 33: { SetPlayerInterior(playerid, 15); SetPlayerVirtualWorld(playerid, 5); SetPlayerPos(playerid, 372.0985, -53.2946, 1076.4708); SetPlayerFacingAngle(playerid, 90.0000); return true; } case 5: { SetPlayerInterior(playerid, 5); SetPlayerPos(playerid, 1265.7104, -793.7453, 1084.0078); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); PlayerInfo[playerid][pInt] = 5; SetPlayerVirtualWorld(playerid, 2); return true; } case 6: { SetPlayerInterior(playerid, 5); SetPlayerPos(playerid, 1265.7104, -793.7453, 1084.0078); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); PlayerInfo[playerid][pInt] = 5; SetPlayerVirtualWorld(playerid, 0); return true; } case 12: { SetPlayerPos(playerid, -61.2984, 1364.5847, 1080.2109); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); SetPlayerFacingAngle(playerid, 100); SetPlayerInterior(playerid,6); SetPlayerVirtualWorld(playerid, 34); PlayerInfo[playerid][pInt] = 6; return true; } case 13: { SetPlayerInterior(playerid, 4); SetPlayerVirtualWorld(playerid, 75); SetPlayerFacingAngle(playerid, 263.0497); SetPlayerPos(playerid, 303.63, 309.25, 999.15); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); PlayerInfo[playerid][pInt] = 0; return true; } case 14: { SetPlayerInterior(playerid, 5); SetPlayerPos(playerid, 1265.7104, -793.7453, 1084.0078); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); PlayerInfo[playerid][pInt] = 5; SetPlayerVirtualWorld(playerid, 1); return true; } case 15: { SetPlayerInterior(playerid, 3); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, 2496.012939, -1708.923217, 1014.742187); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); SetPlayerFacingAngle(playerid, 0.191693); PlayerInfo[playerid][pInt] = 3; SetPlayerVirtualWorld(playerid, 1); return true; } case 17: { SetPlayerFacingAngle(playerid, 90.4248); SetPlayerPos(playerid, -49.7558, 1400.3553, 1084.4297); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); SetPlayerInterior(playerid,8); SetPlayerVirtualWorld(playerid, 36); PlayerInfo[playerid][pInt] = 0; return true; } case 18: { SetPlayerInterior(playerid, 18); SetPlayerVirtualWorld(playerid, 63); SetPlayerPos(playerid, -223.84, 1410.51, 27.77); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); RemovePlayerAttachedObject(playerid, 1); PlayerInfo[playerid][pInt] = 0; return true; } case 23: { SetPlayerInterior(playerid, 11); SetPlayerPos(playerid, 508.3728, -78.6393, 998.9609); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); SetPlayerFacingAngle(playerid, 7.3397); PlayerInfo[playerid][pInt] = 11; SetPlayerVirtualWorld(playerid, 2); return true; } } if(PlayerInfo[playerid][pLevel] >= 1 && PlayerInfo[playerid][pLevel] <= 10000) { SetPlayerPos(playerid, 1154.3717, -1769.2594, 16.5938); SetPlayerFacingAngle(playerid, 0.6853); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); return 1; } } return 1; }
Код HTML:
public OnPlayerSpawn(playerid) { SetPVarInt(playerid, "NoAB", 1); if(gPlayerLogged[playerid] == false) { SendClientMessage(playerid, COLOR_WHITE, "Необходимо авторизоваться!"); Kick(playerid); return true; } if(GetPlayerColor(playerid) == 0xFF) { SendClientMessage(playerid, COLOR_LIGHTRED, "Вы были кикнуты по подозрению в читерстве. (#0244)"); SendClientMessage(playerid, COLOR_LIGHTRED, "Удалите чит программу, чтобы продолжить игру на сервере"); Kick(playerid); return true; } if(PlayerInfo[playerid][pMember] > 0) SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); if(PlayerInfo[playerid][pMember] <= 0) SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); DollahScoreUpdate(); SetPlayerHealthAC(playerid, PlayerInfo[playerid][pHP]); SetPlayerSkills(playerid); SetPlayerSpawn(playerid); return true; }