Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define COR_AZULCLARO 0x33CCFFAA
- new Contagem[MAX_PLAYERS];
- new TempoContagem[MAX_PLAYERS];
- forward TextMorrendo(playerid);
- forward ContagemHospital(playerid);
- public OnFilterScriptInit()
- {
- print("Contagem Regressiva de Hospitalizacao");
- print(" by DJLoko (Bernardo Vieira) ");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "MORRENDO", 1500, 3);
- SetTimer("TextMorrendo", 2000, 1);
- return 1;
- }
- public TextMorrendo(playerid)
- {
- SetPlayerPos(playerid,2040.08,-1411.37,-500.16);
- SetPlayerCameraPos(playerid,1992.93,-1456.59,47.10);
- SetPlayerCameraLookAt(playerid,2040.08,-1411.37,17.16);
- TempoContagem[playerid] = SetTimerEx("ContagemHospital", 1000, 1, "i", playerid);
- Contagem[playerid] = 5;
- return 1;
- }
- public ContagemHospital(playerid)
- {
- new string[64];
- format(string, sizeof(string), "~g~Voce sera ~n~~y~socorrido em ~n~~b~%d Segundos...", Contagem[playerid]);
- GameTextForPlayer(playerid, string, 1500, 3);
- if(Contagem[playerid] == 0)
- {
- KillTimer(TempoContagem[playerid]);
- SpawnPlayer(playerid);
- SetPlayerHealth(playerid, 100.00);
- GivePlayerMoney(playerid, -200);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COR_AZULCLARO,"INFO: Os medicos te salvaram por pouco! Voce pagou 200$");
- }
- Contagem[playerid]--;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement