PHP Code:
stock ExitBone(playerid)
{
new null[2] = 0;
if(GetPVarInt(playerid,"BoneStol_") && BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] <= 0)
{
PTEMP[playerid][pCash]+=BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet];
BoneInfo[GetPVarInt(playerid,"BoneStol")-1][bBank]-=BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet];
}
foreach(new i: Player)
{
if(GetPVarInt(i,"BoneStol") == GetPVarInt(playerid,"BoneStol") && i != playerid && GetPVarInt(i,"BoneStol_") == 1) null[0]++;
if(GetPVarInt(i,"BoneStol") == GetPVarInt(playerid,"BoneStol") && i != playerid && GetPVarInt(i,"BoneStol_") > 1) null[1]++;
}
if(null[0] == 0 && null[1] > 0) ShowItog(GetPVarInt(playerid,"BoneStol")-1);
if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Crupie] == playerid) BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Crupie] = INVALID_PLAYER_ID;
for(new i; i != 4; i++) TextDrawHideForPlayer(playerid,Bone[i]), PlayerTextDrawHide(playerid,PlayerBone[playerid][i]);
for(new i_ = 0; i_ != 5; i_++) if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i_] == playerid) BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i_] = INVALID_PLAYER_ID;
UpdateBone(GetPVarInt(playerid,"BoneStol")-1);
DeletePVar(playerid,"BoneStol");
DeletePVar(playerid,"BoneStol_");
CancelSelectTextDraw(playerid);
return true;
}