if(KostiName[playerid] < 999)
{
new YCMDstr[256];
new string[256];
new dice = random(12)+1;
new dice1 = random(12)+1;
format(YCMDstr, sizeof(YCMDstr), "{DD90FF}%s è %s áðîñèëè êîñòè. Ðåçóëüòàò: {FFCD00}%i:%i",Names(KostiName[playerid]),Names(playerid),dice,dice1);
ProxDetector(5.0, playerid, YCMDstr,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(dice > dice1)
{
PlayerInfo[KostiName[playerid]][pMoney] += KostiMoney[playerid];
PlayerInfo[playerid][pMoney] -= KostiMoney[playerid];
SendClientMessage(KostiName[playerid], COLOR_GREEN, "Ïîçäðàâëÿåì, Âû âûéãðàëè!");
SendClientMessage(playerid, COLOR_ORANGE, "Ê ñîæàëåíèþ, Âû ïðîèãðàëè!");
format(YCMDstr, sizeof(YCMDstr), "~g~+%d$", KostiMoney[playerid]);
GameTextForPlayer(KostiName[playerid], YCMDstr, 3000, 1);
format(YCMDstr, sizeof(YCMDstr), "~r~-%d$", KostiMoney[playerid]);
GameTextForPlayer(playerid, YCMDstr, 3000, 1);
format(string,sizeof(string), "Âûïàëî: %i",dice1);
SetPlayerChatBubble(playerid,string,COLOR_ORANGE,30.0,10000);
format(string,sizeof(string), "Âûïàëî: %i",dice);
SetPlayerChatBubble(KostiName[playerid],string,TEAM_GROVE_COLOR,30.0,10000);
// ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,0,1);
// SetPlayerAttachedObject(playerid, 6, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
// ApplyAnimation(KostiName[playerid],"CARRY","crry_prtial",4.0,1,0,0,1,0,1);
// SetPlayerAttachedObject(KostiName[playerid], 6, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimer("DiceOff", 5000, 0);
OpustitRuki[playerid] = 1;
OpustitRuki[KostiName[playerid]] = 1;
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[KostiName[playerid]] = 0;
KostiMoney[playerid] = 0;
KostiName[playerid] = 999;
}
if(dice < dice1)
{
PlayerInfo[KostiName[playerid]][pMoney] -= KostiMoney[playerid];
PlayerInfo[playerid][pMoney] += KostiMoney[playerid];
SendClientMessage(playerid, COLOR_GREEN, "Ïîçäðàâëÿåì, Âû âûèãðàëè!");
SendClientMessage(KostiName[playerid], COLOR_ORANGE, "Ê ñîæàëåíèþ, Âû ïðîèãðàëè!");
format(YCMDstr, sizeof(YCMDstr), "~g~+%d$", KostiMoney[playerid]);
GameTextForPlayer(playerid, YCMDstr, 3000, 1);
format(YCMDstr, sizeof(YCMDstr), "~r~-%d$", KostiMoney[playerid]);
GameTextForPlayer(KostiName[playerid], YCMDstr, 3000, 1);
format(string,sizeof(string), "Âûïàëî: %i",dice1);
SetPlayerChatBubble(playerid,string,TEAM_GROVE_COLOR,30.0,10000);
format(string,sizeof(string), "Âûïàëî: %i",dice);
SetPlayerChatBubble(KostiName[playerid],string,COLOR_ORANGE,30.0,10000);
/* ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,0,1);
SetPlayerAttachedObject(playerid, 6 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(KostiName[playerid],"CARRY","crry_prtial",4.0,1,0,0,1,0,1);
SetPlayerAttachedObject(KostiName[playerid], 6, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);*/
SetTimer("DiceOff", 5000, 0);
OpustitRuki[playerid] = 1;
OpustitRuki[KostiName[playerid]] = 1;
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[KostiName[playerid]] = 0;
KostiMoney[playerid] = 0;
KostiName[playerid] = 999;
}
if(dice == dice1)
{
SendClientMessage(playerid, COLOR_ORANGE, "Èãðà çàêîí÷èëàñü â íè÷üþ!");
SendClientMessage(KostiName[playerid], COLOR_ORANGE, "Èãðà çàêîí÷èëàñü â íè÷üþ!");
format(string,sizeof(string), "Âûïàëî: %i",dice1);
SetPlayerChatBubble(playerid,string,COLOR_LIGHTBLUE,30.0,10000);
format(string,sizeof(string), "Âûïàëî: %i",dice);
SetPlayerChatBubble(KostiName[playerid],string,COLOR_LIGHTBLUE,30.0,10000);
/* ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,0,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(KostiName[playerid],"CARRY","crry_prtial",4.0,1,0,0,1,0,1);
SetPlayerAttachedObject(KostiName[playerid], 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);*/
SetTimer("DiceOff", 5000, 0);
OpustitRuki[playerid] = 1;
OpustitRuki[KostiName[playerid]] = 1;
dicetime = gettime() + 5;
ZapretDice[playerid] = 0;
ZapretDice[KostiName[playerid]] = 0;
KostiMoney[playerid] = 0;
KostiName[playerid] = 999;
KostiName[playerid] = 999;
}
return true;
}
return true;
}
if(newkeys == 131072)
{
if(KostiName[playerid] < 999)
{
KostiName[playerid] = 999;
KostiMoney[playerid] = 0;
}
}
//==============================================================================