puff2h
Новичок
PHP:
if( GetPVarInt(playerid,"GameStol") != 88)
{
if(!(_:clickedid ^ 0xFFFF))//Esc
{
ShowPlayerDialog(playerid,1255,DIALOG_STYLE_MSGBOX,"Предупреждение","Если вы сделали ставку и игра уже началась,то деньги вам уже не вернутся\nВы точно хотите покинуть стол?","Ок","Отмена");
}
}
if(clickedid == KostiKeyExit)
{
ShowPlayerDialog(playerid,1255,DIALOG_STYLE_MSGBOX,"Предупреждение","Если вы сделали ставку и игра уже началась,то деньги вам уже не вернутся\nВы точно хотите покинуть стол?","Ок","Отмена");
}
PHP:
case 1255:
{
if(response)
{
new stolid = GetPVarInt(playerid,"GameStol");
if(StolInfo[stolid][GameStart] == 0 && GetPVarInt(playerid,"StolReg") != 88)
{
new g = GetPVarInt(playerid,"Crup");
TextDrawHideForPlayer(playerid,KostiBox[stolid]);
TextDrawHideForPlayer(playerid,TableName[stolid]);
TextDrawHideForPlayer(playerid,KostiInfo[stolid]);
TextDrawHideForPlayer(playerid,KostiGameInfo[stolid]);
TextDrawHideForPlayer(playerid,KostiKeyExit);
TextDrawHideForPlayer(playerid,KostiKeyDone);
TextDrawHideForPlayer(playerid,KostiKeyStavka);
SetPVarInt(playerid,"GameStol",88);
SetPVarInt(playerid,"StolReg",88);
TogglePlayerControllable(playerid,1);
CancelSelectTextDraw(playerid);
DelName(playerid,stolid);
SetPVarInt(playerid,"Ochki",88);
PlayerInfo[playerid][pCash] += StolInfo[stolid][Stavka];
if(g == 1)
{
StolInfo[stolid][Crupe] = INVALID_PLAYER_ID;
}
}
else if(StolInfo[stolid][GameStart] == 1 && GetPVarInt(playerid,"StolReg") !=88)
{
new g = GetPVarInt(playerid,"Crup");
new stolid = GetPVarInt(playerid,"GameStol");
TextDrawHideForPlayer(playerid,KostiBox[stolid]);
TextDrawHideForPlayer(playerid,TableName[stolid]);
TextDrawHideForPlayer(playerid,KostiInfo[stolid]);
TextDrawHideForPlayer(playerid,KostiGameInfo[stolid]);
TextDrawHideForPlayer(playerid,KostiKeyExit);
TextDrawHideForPlayer(playerid,KostiKeyDone);
TextDrawHideForPlayer(playerid,KostiKeyStavka);
SetPVarInt(playerid,"GameStol",88);
SetPVarInt(playerid,"StolReg",88);
TogglePlayerControllable(playerid,1);
CancelSelectTextDraw(playerid);
DelName(playerid,stolid);
SetPVarInt(playerid,"Ochki",88);
if(g == 1)
{
StolInfo[stolid][Crupe] = INVALID_PLAYER_ID;
}
}
}
}
---------- Post added at 15:54 ---------- Previous post was at 14:28 ----------
Сам решил уже =)
