[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
#2

Esse FS й seu?

Se for explica um pouco melhor sobre isso ae
Reply
#3

De onde voce retirou isso mesmo?

pawn Код:
#define FILTERSCRIPT
#if defined FILTERSCRIPT
...

pawn Код:
#pragma tabsize 0
O Script nem tem 100 linhas e nгo estб identado...

@ON

Adiciona mais informaзгo, chegar postar o codigo nгo й muito informativo O cуdigo em si, estб demasiado simples...
Reply
#4



Mбs isso nгo ta com a tag da SAFE... u_U
*SAFE = Semana de Artes FъtEis.
Reply
#5

isto й a rgressгo,,o tempo que o player vai ficar no hospital
Reply
#6

Quote:
Originally Posted by Kuddy
Посмотреть сообщение
Ham?

Mбs isso nгo ta com a tag da SAFE... u_U
*SAFE = Semana de Artes FъtEis.
O Ultimo que colocou essa TAG foi de fйrias do fуrum...
Reply
#7

pawn Код:
#include <a_samp>

#define hospor                                                                  0xB8860BAA

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;
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,2782.7371,-2736.4546,-0.0863);
    SetPlayerCameraPos(playerid,1197.5721,-1325.6716,26.9214);
    SetPlayerCameraLookAt(playerid, 1177.6808,-1324.3663,14.0827);
    TogglePlayerControllable(playerid, 0);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    hospital[playerid] = 0;
    return 1;
}

public HospProgresso(playerid)
{
    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]);
    SpawnPlayer(playerid);
    SetPlayerHealth(playerid, 100.00);
    GivePlayerMoney(playerid, -500);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, hospor,"{FF0101}Vocк ja estб melhor. {FFFFFF}os custos ficaram em {FF0101}500$ .");
    }
    Tempo[playerid]--;
}
peguei seu cod e fiz isso ae testado e aprovado acabei de testar aqui.
Reply
#8

Quote:
Originally Posted by Q.I
Посмотреть сообщение
pawn Код:
#include <a_samp>

#define hospor                                                                  0xB8860BAA

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;
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,2782.7371,-2736.4546,-0.0863);
    SetPlayerCameraPos(playerid,1197.5721,-1325.6716,26.9214);
    SetPlayerCameraLookAt(playerid, 1177.6808,-1324.3663,14.0827);
    TogglePlayerControllable(playerid, 0);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    hospital[playerid] = 0;
    return 1;
}

public HospProgresso(playerid)
{
    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]);
    SpawnPlayer(playerid);
    SetPlayerHealth(playerid, 100.00);
    GivePlayerMoney(playerid, -500);
    SetCameraBehindPlayer(playerid);
    TogglePlayerControllable(playerid, 1);
    SendClientMessage(playerid, hospor,"{FF0101}Vocк ja estб melhor. {FFFFFF}os custos ficaram em {FF0101}500$ .");
    }
    Tempo[playerid]--;
}
peguei seu cod e fiz isso ae testado e aprovado acabei de testar aqui.
Obrigado..
Reply
#9

Oh Shit!
Reply
#10

Quote:
Originally Posted by paulor
Посмотреть сообщение
Oh Shit!
??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)