03.05.2015, 14:05
I making Pocketbook system.
When player die server takes player money.
But if player are member or leader i don't want server takes for him money.
But if i set return when player die server don't respawn him in L.S.P.D spawn or FBI spawn or JSO spawn..
When player die server takes player money.
But if player are member or leader i don't want server takes for him money.
But if i set return when player die server don't respawn him in L.S.P.D spawn or FBI spawn or JSO spawn..
Код:
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; }