Advertisement
Guest User

Conagem regressiva no hospital by DJLoko

a guest
Jul 28th, 2010
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.34 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define COR_AZULCLARO 0x33CCFFAA
  4.  
  5. new Contagem[MAX_PLAYERS];
  6. new TempoContagem[MAX_PLAYERS];
  7.  
  8. forward ContagemHospital(playerid);
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.     print("Contagem Regressiva de Hospitalizacao");
  13.     print("     by DJLoko (Bernardo Vieira)     ");
  14.     return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19.     return 1;
  20. }
  21.  
  22. public OnPlayerDeath(playerid, killerid, reason)
  23. {
  24.     TogglePlayerControllable(playerid, 0);
  25.     SetPlayerPos(playerid,2040.08,-1411.37,-500.16);
  26.     SetPlayerCameraPos(playerid,1992.93,-1456.59,47.10);
  27.     SetPlayerCameraLookAt(playerid,2040.08,-1411.37,17.16);
  28.     TempoContagem[playerid] = SetTimerEx("ContagemHospital", 1000, 1, "i", playerid);
  29.     Contagem[playerid] = 5;
  30.     return 1;
  31. }
  32.  
  33. public ContagemHospital(playerid)
  34. {
  35.     new string[64];
  36.     format(string, sizeof(string), "~g~Voce sera ~n~~y~socorrido em ~n~~b~%d Segundos...", Contagem[playerid]);
  37.     GameTextForPlayer(playerid, string, 1500, 3);
  38.     if(Contagem[playerid] == 0)
  39.     {
  40.         KillTimer(TempoContagem[playerid]);
  41.         SpawnPlayer(playerid);
  42.         SetPlayerHealth(playerid, 100.00);
  43.         GivePlayerMoney(playerid, -200);
  44.         SetCameraBehindPlayer(playerid);
  45.         TogglePlayerControllable(playerid, 1);
  46.         SendClientMessage(playerid, COR_AZULCLARO,"INFO: Os medicos te salvaram por pouco! Voce pagou 200$");
  47.     }
  48.     Contagem[playerid]--;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement