[Pedido] Sistema de Hospital
#1

Alguйm ai tem uma FS de sistema de hospital em que, quando a pessoa morre, ela nasce no hospital?
Nota: essa FS nгo pode atrapalhar as prisхes(EX: como todos devem saber, numa org policial quando algum policial mata um bandido ele й preso, entгo essa FS nгo pode atrapalhar as prisхes), pq todas as FS que eu achei a pessoa nascia no hospital e nгo ia para a prisгo :S.
Reply
#2

Aqui:

https://sampforum.blast.hk/showthread.php?pid=2206313#pid2206313
Reply
#3

Quote:
Originally Posted by Caio_Freeze
Посмотреть сообщение
Eu estava usando esse sistema, ele buga a prisгo, a pessoa quando morrer e for presa, ela nasce no hospital e fica livre :/
Reply
#4

Quote:
Originally Posted by lokos45
Посмотреть сообщение
Eu estava usando esse sistema, ele buga a prisгo, a pessoa quando morrer e for presa, ela nasce no hospital e fica livre :/
isso nгo й um bug й sу vc faze pra ele verifica se o cara ta preso e morrer dentro da prisгo nгo ir para o hp

pawn Код:
if(PlayerInfo[playerid][preso] > 0)// no caso voce tem que  coloca a do seu GM
{
    return SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode ir para o hospital se estiver preso!");
}
Reply
#5

Sу usar uma else! E crie uma verificaзгo para que quando o jogador morra ele nasзa no hospital e logo apуs spawna na prisгo
Reply
#6

Quote:
Originally Posted by Caio_Freeze
Посмотреть сообщение
isso nгo й um bug й sу vc faze pra ele verifica se o cara ta preso e morrer dentro da prisгo nгo ir para o hp

pawn Код:
if(PlayerInfo[playerid][preso] > 0)// no caso voce tem que  coloca a do seu GM
{
    return SendClientMessage(playerid, COLOR_RED, "Vocк nгo pode ir para o hospital se estiver preso!");
}
A variбvel de preso do meu GM й assim:

Код:
if(PlayerInfo[playerid][pJailed] == 1)
		{
		    SetPlayerInterior(playerid, 6);
			rand = random(sizeof(gPresoPmSpawns));
			SetPlayerPos(playerid, gPresoPmSpawns[rand][0], gPresoPmSpawns[rand][1], gPresoPmSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoPmSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 2)
		{
		    SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
			SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 9)
		{
		    SetPlayerInterior(playerid, 18);
			SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);//SetPlayerPos(playerid,1175.6014,-1179.9524,87.0427);
			//SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
            SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Cadeia!");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 3)
		{
		    SetPlayerInterior(playerid, 10);
			rand = random(sizeof(gPresoBopeSpawns));
			SetPlayerPos(playerid, gPresoBopeSpawns[rand][0], gPresoBopeSpawns[rand][1], gPresoBopeSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoBopeSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
  		if(PlayerInfo[playerid][pJailed] == 4)
		{
		    SetPlayerInterior(playerid, 3);
		    rand = random(sizeof(gPresoPcSpawns));
			SetPlayerPos(playerid, gPresoPcSpawns[rand][0], gPresoPcSpawns[rand][1], gPresoPcSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoPcSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 5)
		{
		    SetPlayerInterior(playerid, 5);
			rand = random(sizeof(gPresoPfSpawns));
			SetPlayerPos(playerid, gPresoPfSpawns[rand][0], gPresoPfSpawns[rand][1], gPresoPfSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoPfSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 6)
		{
		    SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2695.6262,-2126.2393,13.5488);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 7)
		{
		    SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,-1293.2203,490.5885,11.1953);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 8)
		{
		    SetPlayerInterior(playerid, 6);
			SetPlayerPos(playerid,264.4160,87.2363,1001.0391);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
Entгo no caso eu tenho que colocar na callback "public RecuperouSe() certo? Se sim veja como estб e me diga se estб certo por favor...

Код:
public RecuperouSe()
{
    if(PlayerInfo[playerid][pJailed] == 1)
		{
		    SetPlayerInterior(playerid, 6);
			rand = random(sizeof(gPresoPmSpawns));
			SetPlayerPos(playerid, gPresoPmSpawns[rand][0], gPresoPmSpawns[rand][1], gPresoPmSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoPmSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 2)
		{
		    SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
			SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 9)
		{
		    SetPlayerInterior(playerid, 18);
			SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);//SetPlayerPos(playerid,1175.6014,-1179.9524,87.0427);
			//SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
            SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Cadeia!");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 3)
		{
		    SetPlayerInterior(playerid, 10);
			rand = random(sizeof(gPresoBopeSpawns));
			SetPlayerPos(playerid, gPresoBopeSpawns[rand][0], gPresoBopeSpawns[rand][1], gPresoBopeSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoBopeSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
  		if(PlayerInfo[playerid][pJailed] == 4)
		{
		    SetPlayerInterior(playerid, 3);
		    rand = random(sizeof(gPresoPcSpawns));
			SetPlayerPos(playerid, gPresoPcSpawns[rand][0], gPresoPcSpawns[rand][1], gPresoPcSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoPcSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 5)
		{
		    SetPlayerInterior(playerid, 5);
			rand = random(sizeof(gPresoPfSpawns));
			SetPlayerPos(playerid, gPresoPfSpawns[rand][0], gPresoPfSpawns[rand][1], gPresoPfSpawns[rand][2]); // Warp the player
			SetPlayerFacingAngle(playerid, gPresoPfSpawns[rand][3]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 6)
		{
		    SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2695.6262,-2126.2393,13.5488);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 7)
		{
		    SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,-1293.2203,490.5885,11.1953);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
		if(PlayerInfo[playerid][pJailed] == 8)
		{
		    SetPlayerInterior(playerid, 6);
			SetPlayerPos(playerid,264.4160,87.2363,1001.0391);
			SendClientMessage(playerid, COLOR_LIGHTRED, "Sentenзa incompleta,Vocк voltou para Prisгo");
			return true;
		}
{
    for(new p = 0; p < MAX_PLAYERS; p++)
    {
        if(Morreu[p])
        {
            TempoHospital[p]++;
            new Float:vida;
            GetPlayerHealth(p, vida);
            ApplyAnimation(p, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
            switch(TempoHospital[p])
            {
                case 1 .. 59:
                {
                    SetPlayerHealth(p, vida+1);
                }
                case 60:
                {
                    Morreu[p] = false;
                    SendClientMessage(p, 0xA9C4E4AA, "");
                    SendClientMessage(p, 0xA9C4E4AA, "{DD2222}Mйdico{FFFFFF} diz: Vocк foi recuperado. Seja mais cuidado a partir de agora.");
                    ClearAnimations(p);
                    SetPlayerPos(p, 1175.0963, -1318.3589, 9280.5693);
                    SetCameraBehindPlayer(p);
                    SetPlayerFacingAngle(p, 177.8791);
                    SetPlayerInterior(p, 1);
                    TempoHospital[p] = 0;
                }
            }
        }
    }
    return 1;
}
Ou й na callback "public OnPlayerDeath"?
Outra pergunta, caso seja isso, terei que implantar no GM para dar certo?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)