01.09.2009, 05:54
I try do modify some script..
Im trying to do a mode that if you are in hospital.. you can't out from here like 24 hours.
i successed to do it but i have a problem.. if you log out and reconnect to the character, the charater respawn out from the hospital.
i want to do that when you logout and connect back your player will be in the same place in the hospital.. like tha jail.
there's the script:
what should i add here that will tell the game that if i logout and connect back .. the player will be respawn in the hospital to continue his waiting time in the hospital.. i mean: i need to be 24 hours in hospital.. and i've been like 5 hours.. so i exit the game and reconnect and now i need to wait 19hours.
HOPE you will understand me.
Alot of thanks for the helpers.!
Im trying to do a mode that if you are in hospital.. you can't out from here like 24 hours.
i successed to do it but i have a problem.. if you log out and reconnect to the character, the charater respawn out from the hospital.
i want to do that when you logout and connect back your player will be in the same place in the hospital.. like tha jail.
there's the script:
Код:
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0) { if(FirstSpawn[playerid] != 1) { /*new string[256]; new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost; SafeGivePlayerMoney(playerid, -cut); format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut); SendClientMessage(playerid, TEAM_CYAN_COLOR, string); MedicBill[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0;*/ PlayerInfo[playerid][pDeaths] += 1; SetPlayerHealth(playerid, 25.0); SetPlayerInterior(playerid, 3); PlayerInfo[playerid][pInt] = 3; rand = random(sizeof(gMedicSpawns)); SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player SetPlayerFacingAngle(playerid, 0); TogglePlayerControllable(playerid, 0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 30000, 3); JustDied[playerid] = 1; MedicTime[playerid] = 1; ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); if(PlayerInfo[playerid][pDonateRank] >= 0) { NeedMedicTime[playerid] = 43200; } else { NeedMedicTime[playerid] = 43300; } PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0); return 1;
HOPE you will understand me.
Alot of thanks for the helpers.!