[Ajuda] Hospital nгo funciona
#1

Bom, to usando o sistema de hospital desse tуpico: https://sampforum.blast.hk/showthread.php?tid=289753
Fiz tudo direitinho mas quando morro, nгo sou teletransportado pra lб
Reply
#2

Voce mudou de SetPlayerPos(playerid, X,Y,Z); para as posiзoes que deseja?
Reply
#3

Quote:
Originally Posted by Gustavo_Araujo
Посмотреть сообщение
Voce mudou de SetPlayerPos(playerid, X,Y,Z); para as posiзoes que deseja?
aham.
Reply
#4

Como esta seu OnPlayerDeath?
Reply
#5

tentei tb fazer o tutorial + e bugado... e tem um detalhe se + 1 morrer... vai ficar geral grudado... e congelado.. entгo dei uma mexida nele.. e msm com essas mexidas fico bugado..... aprece 2 vezes o nome quando morrer e nasce... fiz exatamente como no tutorial.. apenas modifiquei algumas coisas.. ao gosto...


pawn Код:
new Hospital[MAXPLAYERS] = 0;
forward Curando(playerid);


public OnPlayerDeath(playerid, killerid, reason)
{
Hospital[playerid] = 1;
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(Hospital[playerid] == 1)
{
SetPlayerHealth(playerid, 50.0);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 348.8042,162.5563,1014.6947); // Warp the player
SetPlayerFacingAngle(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
//TogglePlayerControllable(playerid, false);
SetTimerEx("Curando", 10000, false, "i", playerid);
SendClientMessage(playerid, 0xFF3030FF,"[ Hospital ] {FFFFFF}Vocк estб sendo curado.");        // Vocк pode acrescentar mais coisas ao seu gosto.
}
return 1;
}



public Curando(playerid)
{
TogglePlayerControllable(playerid, true);
Hospital[playerid] = 0;
OnPlayerSpawn(playerid);
SendClientMessage(playerid, 0xFF3030FF,"[ Hospital ] {FFFFFF}Medico KidBengala le curou !!!");
return true;
}

se alguйm souber uma forma deixa ai... um exemplo !
Reply
#6

й, entгo pelo jeito esse sistema й bugado
Reply
#7

Troque isso:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(Hospital[playerid] == 1)
{
SetPlayerHealth(playerid, 50.0);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 348.8042,162.5563,1014.6947); // Warp the player
SetPlayerFacingAngle(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
//TogglePlayerControllable(playerid, false);
SetTimerEx("Curando", 10000, false, "i", playerid);
SendClientMessage(playerid, 0xFF3030FF,"[ Hospital ] {FFFFFF}Vocк estб sendo curado.");        // Vocк pode acrescentar mais coisas ao seu gosto.
}
return 1;
}
Por isso:

pawn Код:
public OnPlayerSpawn(playerid)
{
if(Hospital[playerid] == 1)
{
SetPlayerHealth(playerid, 50.0);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 348.8042,162.5563,1014.6947); // Warp the player
SetPlayerFacingAngle(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
//TogglePlayerControllable(playerid, false);
SetTimerEx("Curando", 10000, false, "i", playerid);
SendClientMessage(playerid, 0xFF3030FF,"[ Hospital ] {FFFFFF}Vocк estб sendo curado.");        // Vocк pode acrescentar mais coisas ao seu gosto.
}
return 1;
}
Reply
#8

Quote:
Originally Posted by Los
Посмотреть сообщение
Troque isso:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(Hospital[playerid] == 1)
{
SetPlayerHealth(playerid, 50.0);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 348.8042,162.5563,1014.6947); // Warp the player
SetPlayerFacingAngle(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
//TogglePlayerControllable(playerid, false);
SetTimerEx("Curando", 10000, false, "i", playerid);
SendClientMessage(playerid, 0xFF3030FF,"[ Hospital ] {FFFFFF}Vocк estб sendo curado.");        // Vocк pode acrescentar mais coisas ao seu gosto.
}
return 1;
}
Por isso:

pawn Код:
public OnPlayerSpawn(playerid)
{
if(Hospital[playerid] == 1)
{
SetPlayerHealth(playerid, 50.0);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 348.8042,162.5563,1014.6947); // Warp the player
SetPlayerFacingAngle(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
//TogglePlayerControllable(playerid, false);
SetTimerEx("Curando", 10000, false, "i", playerid);
SendClientMessage(playerid, 0xFF3030FF,"[ Hospital ] {FFFFFF}Vocк estб sendo curado.");        // Vocк pode acrescentar mais coisas ao seu gosto.
}
return 1;
}
Nгo funfo
Reply
#9

Yes! Aproveitando o Topico quando eu fiz meu Sistema de Hospital tinha um bug maldito que me fez eu me desfazer dele porque toda vez que um Player logava ia pro Hospital nгo sei o motivo alguйm sabe ?
Reply
#10

Quote:
Originally Posted by ceesar90
Посмотреть сообщение
й, entгo pelo jeito esse sistema й bugado
se vocк tivesse lido o topico nгo iria dar problema, mais voce so passou la e deu ctrl + c e ctrl + v no seu gm.

agora poste o codigo do geito que voce botou no seu gm.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)