03.05.2015, 13:28
How i can return something, and then continue..
public ReleaseFromHospital(playerid) { KillTimer(stopactimer[playerid]); Dead[playerid] = 1; SCM(playerid, COLOR_LIGHT_BLUE, "You were released from hospital."); TogglePlayerControllable(playerid, 1); SetCameraBehindPlayer(playerid); SafeSetPlayerHealth(playerid, 50.0); if(PlayerInfo[playerid][pPocketbookexpire] < 1) { PlayerInfo[playerid][pPocketbook] = 0; PlayerInfo[playerid][pPocketbookexpire] = 0; SCM(playerid, COLOR_WHITE, "Your Pocketbook expire buy new!"); } if(PlayerInfo[playerid][pPocketbook] > 0) { SCM(playerid, COLOR_WHITE, "You are insured."); SafeGivePlayerMoney(playerid, -500); } if(PlayerInfo[playerid][pPocketbook] < 1) { SCM(playerid, COLOR_WHITE, "You don't have pocketbook"); } if((PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) && PlayerInfo[playerid][pDuty] == 1)//L.S.P.D spawn { SetPlayerToTeamColor(playerid); SafeSetPlayerInterior(playerid,6); SafeSetPlayerPos(playerid, 216.9725,79.1339,1005.0391); SetPlayerFacingAngle(playerid, 270.0); SafeSetPlayerArmor(playerid, 50.0); return 1; } if(PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { SCM(playerid, COLOR_WHITE, "Country pay insured for you."); return 1; } else if((PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) && PlayerInfo[playerid][pDuty] == 1)//FBI spawn { SetPlayerToTeamColor(playerid); SafeSetPlayerInterior(playerid,3); SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719); SetPlayerFacingAngle(playerid, 90); SafeSetPlayerHealth(playerid, 75.0); SafeSetPlayerArmor(playerid, 75.0); return 1; } else if((PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) && PlayerInfo[playerid][pDuty] == 1)//JSO spawn { SetPlayerToTeamColor(playerid); SafeSetPlayerInterior(playerid, 0); SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937); SafeSetPlayerHealth(playerid, 100.0); SafeSetPlayerArmor(playerid, 99.0); return 1; } else { new decidehosp = random(2); switch(decidehosp) { case 0: { SafeSetPlayerPos(playerid, 1177.4866,-1323.9749,14.0731); SetPlayerFacingAngle(playerid, 270.0); SafeSetPlayerInterior(playerid, 0); SafeResetPlayerWeapons(playerid); } case 1: { SafeSetPlayerPos(playerid, 2025.1497,-1402.8643,17.2089); SetPlayerFacingAngle(playerid, 270.0); SafeSetPlayerInterior(playerid, 0); SafeResetPlayerWeapons(playerid); } } } KillTimer(stopactimer[playerid]); stopactimer[playerid] = SetTimerEx("resumeanticheat", 4000, false, "i", playerid); return 1; }
#define ActiveMemberOnDuty(%0,%1) (PlayerInfo[%0][pDuty] && (PlayerInfo[%0][pMember] == %1 || PlayerInfo[%0][pLeader] == %1))
public ReleaseFromHospital(playerid)
{
KillTimer(stopactimer[playerid]);
Dead[playerid] = 1;
SCM(playerid, COLOR_LIGHT_BLUE, "You were released from hospital.");
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
SafeSetPlayerHealth(playerid, 50.0);
if(PlayerInfo[playerid][pPocketbookexpire] < 1)
{
PlayerInfo[playerid][pPocketbook] = 0;
PlayerInfo[playerid][pPocketbookexpire] = 0;
SCM(playerid, COLOR_WHITE, "Your Pocketbook expire buy new!");
}
if(!PlayerInfo[playerid][pPocketbook]) {
SCM(playerid, COLOR_WHITE, "You don't have pocketbook");
SafeGivePlayerMoney(playerid, -500);
}
else {
SCM(playerid, COLOR_WHITE, "You are insured.");
}
KillTimer(stopactimer[playerid]);
stopactimer[playerid] = SetTimerEx("resumeanticheat", 4000, false, "i", playerid);
if(ActiveMemberOnDuty(playerid, 1) || ActiveMemberOnDuty(playerid, 2) || ActiveMemberOnDuty(playerid, 3))
{
SCM(playerid, COLOR_WHITE, "Country pay insured for you.");
}
if(ActiveMemberOnDuty(playerid, 1))//L.S.P.D spawn
{
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
SafeSetPlayerPos(playerid, 216.9725,79.1339,1005.0391);
SetPlayerFacingAngle(playerid, 270.0);
SafeSetPlayerArmor(playerid, 50.0);
return 1;
}
if(ActiveMemberOnDuty(playerid, 2)) //FBI spawn
{
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
SafeSetPlayerHealth(playerid, 75.0);
SafeSetPlayerArmor(playerid, 75.0);
return 1;
}
if(ActiveMemberOnDuty(playerid, 3))
{
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid, 0);
SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
SafeSetPlayerHealth(playerid, 100.0);
SafeSetPlayerArmor(playerid, 99.0);
return 1;
}
new decidehosp = random(2);
switch(decidehosp)
{
case 0: SafeSetPlayerPos(playerid, 1177.4866,-1323.9749,14.0731);
case 1: SafeSetPlayerPos(playerid, 2025.1497,-1402.8643,17.2089);
}
SetPlayerFacingAngle(playerid, 270.0);
SafeSetPlayerInterior(playerid, 0);
SafeResetPlayerWeapons(playerid);
return 1;
}
if(ActiveMemberOnDuty(playerid, 1) || ActiveMemberOnDuty(playerid, 2) || ActiveMemberOnDuty(playerid, 3)) { SCM(playerid, COLOR_WHITE, "Country pay insured for you."); return 1; }