- 0
Sign in to follow this
Followers
0
Почему некоторые игроки после перезахода на сервер умирают и появляются в больнице?
Asked by
archiboy6 P
,
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
-
By fresko241
Привет, я только обучаюсь разработке. Хочу узнать у меня есть радио, музыка играет. Но как можно сделать чтобы музыка играла только в машине и слышна была и людям которые возле нее.
-
Posted · Report post
Почему некоторые игроки после перезахода на сервер умирают и появляются в больнице?
{ RemovePlayerAttachedObject(playerid, 0); if(PlayerLogged[playerid] == false) { SendClientMessage(playerid, COLOR_RED, PlayerNeedToLoggedForToPlay); return SKick(playerid, 2); } StopAudioStreamForPlayer(playerid); PlayerSpawned[playerid] = false; if(PI[playerid][pCash]) { ResetPlayerMoney(playerid); GivePlayerMoney(playerid, PI[playerid][pCash]); } if(UseWork[playerid]) { UseWork[playerid] = 0; for(new i; i < 6; i++) PlayerTextDrawHide(playerid, StatusWork[playerid][i]); } TogglePlayerControllable(playerid, true); SetHealth(playerid, 90); SetHunger(playerid, PI[playerid][pHunger]); DisablePlayerCheckpoint(playerid); SetPlayerVirtualWorld(playerid, 0); SetPlayerScore(playerid, PI[playerid][pLevel]); if(PI[playerid][pFightStyle]) SetPlayerFightingStyle(playerid, PI[playerid][pFightStyle]); else SetPlayerFightingStyle(playerid, 0); if(PI[playerid][pWanted]) SetPlayerWantedLevel(playerid, PI[playerid][pWanted]); //PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0); SetPVarInt(playerid, "K_Times", 0); SetPVarInt(playerid, "AC_Protection", 1); Air_Gettime(playerid, 6); SetPlayerSkills(playerid); if(GetPVarInt(playerid, "Connected")) { for(new i; i < 13; i++) { if(!PI[playerid][pGun][i] || !PI[playerid][pAmmo][i]) continue; GivePlayerWeaponAC(playerid, PI[playerid][pGun][i], PI[playerid][pAmmo][i]); } new gun_string[56], ammo_string[56], string[256]; format(gun_string, 56, "0,0,0,0,0,0,0,0,0,0,0,0,0"); format(ammo_string, 56, "0,0,0,0,0,0,0,0,0,0,0,0,0"); format(string, sizeof(string), "UPDATE "T_ACCOUNTS" SET `guns` = '%s', `ammos` = '%s' WHERE `id` = '%i'", gun_string, ammo_string, PI[playerid][pID]); mysql_tquery(dbHandle, string, "", ""); DeletePVar(playerid, "Connected"); PreloadAnimLibs(playerid); } if(PI[playerid][pMember]) SetPlayerSkin(playerid, PI[playerid][pMemberSkin]); else SetPlayerSkin(playerid, PI[playerid][pModel]); SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]); if(PI[playerid][Spectating][0] != INVALID_PLAYER_ID) { SetPlayerPos(playerid, GetPVarFloat(playerid, "SpecX"), GetPVarFloat(playerid, "SpecY"), GetPVarFloat(playerid, "SpecZ")); SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "SpecA")); 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"); PI[playerid][Spectating][0] = INVALID_PLAYER_ID; PI[playerid][Spectating][1] = INVALID_PLAYER_ID; SetPlayerColorEx(playerid, TeamColors[GetTeamID(playerid)]); SetPlayerScore(playerid, PI[playerid][pLevel]); if(PI[playerid][pWanted]) SetPlayerWantedLevel(playerid, PI[playerid][pWanted]); if(PI[playerid][pMember]) SetPlayerSkin(playerid, PI[playerid][pMemberSkin]); else if(Oldskin2[playerid] > 0) SetPlayerSkin(playerid, Oldskin2[playerid]); else SetPlayerSkin(playerid, PI[playerid][pModel]); return 1; } else if(ClothesRound[playerid] == 2) { new string[128]; SendClientMessage(playerid, COLOR_ORANGE, ""cPS"Выберите себе подходящую одежду, после выбора нажмите 'Далее', для отмены нажмите 'Выход'"); SendClientMessage(playerid, COLOR_ORANGE, ""cPS"Чтобы просмотреть одежду, используйте стрелочки на экране!"); new WM = 2 +random(100); SetPlayerVirtualWorld(playerid,WM); SetPlayerInterior(playerid,9); SetPlayerPos(playerid,622.6929, 42.5903, 1012.3646); SetPlayerFacingAngle(playerid, 130.00); SetPlayerCameraPos(playerid, 617.8176, 38.5465, 1012.8831); SetPlayerCameraLookAt(playerid, 618.6187, 39.1424, 1012.7786); ApplyAnimation(playerid,"DEALER","DEALER_IDLE",4.1,1,1,1,1,1); TogglePlayerControllable(playerid, 0); for(new i; i < 8; i++) TextDrawShowForPlayer(playerid, Button[i]); SelectTextDraw(playerid, COLOR_ORANGE); if(PI[playerid][pSex] == 1) { SelectCharPlace[playerid] = 0; SetPlayerSkin(playerid, JoinShopM[SelectCharPlace[playerid]][0]); format(string, sizeof(string), "~w~ЦЕНА: ~g~%iр", JoinShopM[SelectCharPlace[playerid]][1]); } else { SelectCharPlace[playerid] = 0; SetPlayerSkin(playerid, JoinShopF[SelectCharPlace[playerid]][0]); format(string, sizeof(string), "~w~ЦЕНА: ~g~%iр", JoinShopF[SelectCharPlace[playerid]][1]); } //GameTextForPlayer(playerid, string, 5000, 1); } else if(PI[playerid][pJail] == 1) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid,0); SetPlayerPos(playerid, 1612.7550, 1641.0354, 1013.0469); SetPlayerFacingAngle(playerid, 0.0); SetCameraBehindPlayer(playerid); FreezePlayer(playerid, 3000); new string[80]; format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", PI[playerid][pJailTime]); GameTextForPlayer(playerid, string, 3000, 3); SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (( /jtime ))"); } else if(PI[playerid][pJail] == 2) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid,0); SetPlayerPos(playerid,1612.7550, 1641.0354, 1013.0469); SetPlayerFacingAngle(playerid, 0.00); SetCameraBehindPlayer(playerid); FreezePlayer(playerid, 3000); new string[80]; format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", PI[playerid][pJailTime]); GameTextForPlayer(playerid, string, 3000, 3); SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (( /jtime ))"); } else if(PI[playerid][pJail] == 3) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,585.1162,2788.9954,1253.9860); SetPlayerFacingAngle(playerid, 269.4590); SetCameraBehindPlayer(playerid); FreezePlayer(playerid, 3000); new string[80]; format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", PI[playerid][pJailTime]); GameTextForPlayer(playerid, string, 3000, 3); SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (( /jtime ))"); } else if(PI[playerid][pJail] == 4) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,831.0169, 1318.9730, 421.0243); SetPlayerFacingAngle(playerid, 0.000); SetCameraBehindPlayer(playerid); FreezePlayer(playerid, 3000); new string[80]; format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%d", PI[playerid][pJailTime]); GameTextForPlayer(playerid, string, 3000, 3); SendClientMessage(playerid, COLOR_RED, "Вы еще не отсидели свой тюремный срок (( /jtime ))"); } else if(PlayerDied[playerid] == true && PI[playerid][pJail] == 0) { InHospital[playerid] = true; SetHealth(playerid, 10+random(40)); SetPlayerFacingAngle(playerid, 270); switch(PI[playerid][pCity]) { case 1: { SetPlayerVirtualWorld(playerid,4); SetPlayerInterior(playerid,0); } case 2: { SetPlayerVirtualWorld(playerid,4); SetPlayerInterior(playerid,0); } default: { SetPlayerVirtualWorld(playerid,4); SetPlayerInterior(playerid,0); } } HospitalHealth(playerid); FreezePlayer(playerid, 3000); new Random = random(sizeof(MedicSpawn)); SetPlayerPos(playerid, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 4); SetPlayerFacingAngle(playerid, -90.0); SendClientMessage(playerid,COLOR_WHITE,"Вам придется пройти курс лечения или вылечиться у медика. Войдите в палату и делайте процедуру."); }
Share this post
Link to post