02.04.2012, 19:03
pawn Код:
forward Ambu(playerid);
forward HospitalCountdown(playerid);
forward CarregarHospital(playerid);
forward CarregarHospital2(playerid);
if(ApertarFnaMorte[playerid] == 1)
{
HospitalCountdown(playerid);
PlayerIsDead[playerid] = 0;
}
if(FixBug[playerid] == 0 && Hospital[playerid] == 1 && Player[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0 && Player[playerid][pVIP] != 2)
{
Hospital[playerid] = 0;
Irhosp = SetTimerEx("Ambu", 1000, 0, "i", playerid);
return 1;
}
public Ambu(playerid)
{
CarregarHospital(playerid);
ApplyAnimation(playerid,"CRACK", "crckdeth2", 4.0, 1, 1, 1, 0, 45000);
OnPlayerCommandText(playerid,"/morridiabo");
SetPlayerPos(playerid, 2611.8774,-1299.9427,1132.4976);
SetPlayerInterior(playerid, 3);
SetPlayerFacingAngle(playerid, 180.0);
TogglePlayerControllable(playerid, 0);
SetPlayerCameraPos(playerid,2612.5737,-1294.6964,1131.5117);
SetPlayerCameraLookAt(playerid,2611.9294,-1296.7310,1131.5117);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid, "~r~Curando...", 30000, 5);
Irhosp2 = SetTimerEx("HospitalCountdown", 30000, 0, "i", playerid);
return 0;
}
public HospitalCountdown(playerid)
{
ApertarFnaMorte[playerid] = 0;
Hospital[playerid] = 0;
if(Player[playerid][pVIP] == 1)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 30);
Player[playerid][pDeaths] += 1;
ClearAnimations(playerid);
TogglePlayerControllable( playerid, 1);
SetPlayerInterior(playerid, 0);
SafeGivePlayerWeapon(playerid, 22, 100);
SafeGivePlayerWeapon(playerid, 29, 250);
SafeGivePlayerWeapon(playerid, 31, 250);
new rand;
rand = random(sizeof(HospSpawns));
SetPlayerPos(playerid, HospSpawns[rand][0], HospSpawns[rand][1], HospSpawns[rand][2]);
SendClientMessage(playerid, TEAM_CYAN_COLOR, "[Enfermeira]Vocк estб melhor, jб pode ir para casa!");
SetCameraBehindPlayer(playerid);
ResetPlayerWeapons(playerid);
return 1;
}
else if((strcmp("Ambulвncia", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Ambulвncia")) || (strcmp("Ambulancia", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Ambulancia")))
{
SendClientMessage(playerid, COLOR_GOLD, "EMERGКNCIA: Estou transferindo sua ligacгo para o Hospital, mantenha calma.");
Mobile[playerid] = 914;
SendClientMessage(playerid, COLOR_MEDICOS, "Despacho: Por favor me dк uma breve descricгo do incidente.");
return 0;
}
#pragma unused encode_tires
public CarregarHospital(playerid)
{
ApplyAnimation(playerid,"CRACK", "crckdeth2", 4.0, 1, 1, 1, 0, 45000);
OnPlayerCommandText(playerid,"/morridiabo");
TogglePlayerControllable(playerid, false);
SetTimerEx("Carregar2", 1800, 0,"e",playerid); //
return 1;
}//carrega 1
public CarregarHospital2(playerid)
{
ApplyAnimation(playerid,"CRACK", "crckdeth2", 4.0, 1, 1, 1, 0, 45000);
OnPlayerCommandText(playerid,"/morridiabo");
TogglePlayerControllable(playerid, false);
return 1;
}