if(PlayerInfo[playerid][pHospital] == 1)
{
new rand;
rand = random(sizeof(gLeganjeMD));
SetPlayerPos(playerid, gLeganjeMD[rand][0], gLeganjeMD[rand][1], gLeganjeMD[rand][2]);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SendClientMessage(playerid, C_RED, "{CFCB08}You have been moved to hospital cuz u ded m8.");
SetPlayerSkin(playerid, 62);
TogglePlayerControllable(playerid, 0);
SetTimerEx("TeleportTimer", 2000, false, "d", playerid);
bolnicatimer[playerid] = SetTimerEx("BolnicaTimerce", 1000, true, "d", playerid);
SetTimerEx("BolnicaLeganjeTimer", 2010, false, "d", playerid);
SetPlayerFacingAngle(playerid, 360);
}
if(PlayerInfo[playerid][pHospital] == 0)
{
... There i put some other stuff for normal spawn position( like textdraw shows for example)
}
forward TeleportTimer(playerid);
public TeleportTimer(playerid)
{
TogglePlayerControllable(playerid, 1);
}
//------------------------------------------------------------------------------
forward BolnicaLeganjeTimer(playerid);
public BolnicaLeganjeTimer(playerid)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SetTimerEx("AnimacijaBolnica", 15000, false, "d", playerid);
}
//------------------------------------------------------------------------------
forward BolnicaTimerce(playerid);
public BolnicaTimerce(playerid)
{
if(PlayerInfo[playerid][pHospital] == 1)
{
if(PlayerInfo[playerid][pHospitalTime] >= 1)
{
PlayerInfo[playerid][pHospitalTime] -= 1;
return 1;
}
else if(PlayerInfo[playerid][pHospitalTime] == 0)
{
new string[126];
new string1[126];
new medicbill = 100*PlayerInfo[playerid][pLevel];
PlayerInfo[playerid][pHospitalTime] = 0;
PlayerInfo[playerid][pHospital] = 0;
SendClientMessage(playerid, C_GRAD1,"{739EFA}Doktor: {FFFFFF}You can go now m8 hospital isnt a place for u anymore.");
OdzemiPari(playerid, medicbill);
format(string1, sizeof(string1), "{739EFA}Doktor: {FFFFFF}Your bill is: $%d.",medicbill);
SendClientMessage(playerid, C_BLCRVENA,string1);
format(string, sizeof(string), "~g~YOU ARE READY TO GO!");
GameTextForPlayer(playerid, string, 5000, 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
TogglePlayerControllable(playerid, 1);
KillTimer(bolnicatimer[playerid]);
SpawnPlayer( playerid );
}
}
return 1;
}
thanks
|
SendClientMessage(playerid, C_RED, "{CFCB08}You have been moved to hospital cuz u ded m8."); |
if(PlayerInfo[playerid][pHospital] == 1) {
new rand;
rand = random(sizeof(gLeganjeMD));
SetPlayerPos(playerid, gLeganjeMD[rand][0], gLeganjeMD[rand][1], gLeganjeMD[rand][2]);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SendClientMessage(playerid, C_RED, "{CFCB08}You have been moved to hospital cuz u ded m8.");
SetPlayerSkin(playerid, 62);
TogglePlayerControllable(playerid, 0);
SetTimerEx("TeleportTimer", 2000, false, "d", playerid);
bolnicatimer[playerid] = SetTimerEx("BolnicaTimerce", 1000, true, "d", playerid);
SetTimerEx("BolnicaLeganjeTimer", 2010, false, "d", playerid);
SetPlayerFacingAngle(playerid, 360);
} else {
// Your input :P
}
forward BolnicaTimerce(playerid);
public BolnicaTimerce(playerid)
{
if(PlayerInfo[playerid][pHospital] == 1)
{
if(PlayerInfo[playerid][pHospitalTime] >= 1)
{
PlayerInfo[playerid][pHospitalTime] -= 1;
return 1;
} else {
new string[128];
new medicbill = 100*PlayerInfo[playerid][pLevel];
PlayerInfo[playerid][pHospitalTime] = 0;
PlayerInfo[playerid][pHospital] = 0;
SendClientMessage(playerid, C_GRAD1,"{739EFA}Doktor: {FFFFFF}You can go now m8 hospital isnt a place for u anymore.");
OdzemiPari(playerid, medicbill);
format(string, sizeof(string), "{739EFA}Doktor: {FFFFFF}Your bill is: $%d.",medicbill);
SendClientMessage(playerid, C_BLCRVENA,string);
format(string, sizeof(string), "~g~YOU ARE READY TO GO!");
GameTextForPlayer(playerid, string, 5000, 1);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
TogglePlayerControllable(playerid, 1);
KillTimer(bolnicatimer[playerid]);
SpawnPlayer( playerid );
}
}
return 1;
}