[FilterScript] Hospital 1.0
#1

Hospital
e aew turminha,,ta aew meu sistema de Hosp,,sу adaptar certinho ao seu GM

pawn Код:
#include <a_samp>

#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define hospor 0xB8860BAA
#pragma tabsize 0

//---------------------------
new Tempo[MAX_PLAYERS];
new Tempo2[MAX_PLAYERS];
new hospital[MAX_PLAYERS];
//--------------------------

forward HospProgresso(playerid);
//----------------------------------

//====================================================================================================
public OnFilterScriptInit()
{
        print("Hospital by FenixBorn Carregado");
        return 1;
}
//====================================================================================================
public OnPlayerDeath(playerid, killerid, reason)
{
        hospital[playerid] = 1;
        return 1;
}
//====================================================================================================
public OnPlayerSpawn(playerid)
{
        if(hospital[playerid] > 0)
        {
                Tempo2[playerid] = SetTimerEx("HospProgresso", 1000, 1, "i", playerid);
                Tempo[playerid] = 20; //Tempo que o player ira demorar para dar Spawn
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid,2782.7371,-2736.4546,-0.0863);
                SetPlayerCameraPos(playerid,1197.5721,-1325.6716,26.9214); //camera mostra o Hospital de LS
                SetPlayerCameraLookAt(playerid, 1177.6808,-1324.3663,14.0827);
                TogglePlayerControllable(playerid, 0); //player sem movimento
        }
        return 1;
}
//===================================================================================================
public OnPlayerConnect(playerid)
{
    hospital[playerid] = 0; //Para o player nao spawnar no Hospital
    return 1;
}
//====================================================================================================
public HospProgresso(playerid) //Quando o player morrer
{
        new string[64];
        format(string, sizeof(string), "~w~Voce esta sendo ~r~Curado.", Tempo[playerid]);
        GameTextForPlayer(playerid, string, 1500, 3);
        hospital[playerid] = 0;

if(Tempo[playerid] == 0)
{
        KillTimer(Tempo2[playerid]); //Finaliza o tempo de espera
        SpawnPlayer(playerid); //Spawna o player
        SetPlayerHealth(playerid, 100.00); //Recupera o player 100%
        GivePlayerMoney(playerid, -500); //Retira 500 reais pelo atendimento medico
        SetCameraBehindPlayer(playerid); //camera no player
        TogglePlayerControllable(playerid, 1); //Player ja pode se mover
        SendClientMessage(playerid, hospor,"{FF0101}Vocк ja estб melhor. {FFFFFF}os custos ficaram em {FF0101}500$ .");
}
Tempo[playerid]--;
}
#endif
Reply


Messages In This Thread
[FilterScript] Hospital 1.0 - by FenixBorn - 02.09.2012, 20:19
Re: [FilterScript] Hospital 1.0 - by GhosT_[] - 02.09.2012, 20:32
Re: [FilterScript] Hospital 1.0 - by Douglas_prt - 02.09.2012, 20:32
Re: [FilterScript] Hospital 1.0 - by Kuddy - 02.09.2012, 20:37
Re: [FilterScript] Hospital 1.0 - by FenixBorn - 02.09.2012, 20:38
Re: [FilterScript] Hospital 1.0 - by Douglas_prt - 02.09.2012, 20:39
Re: [FilterScript] Hospital 1.0 - by Q.I - 02.09.2012, 20:43
Re: [FilterScript] Hospital 1.0 - by FenixBorn - 02.09.2012, 20:49
Re: [FilterScript] Hospital 1.0 - by paulor - 02.09.2012, 21:07
Re: [FilterScript] Hospital 1.0 - by FenixBorn - 02.09.2012, 21:24

Forum Jump:


Users browsing this thread: 1 Guest(s)