bab4uk_company
Умник
Добрый день, хочу чтобы в казино играли не на вирты, а на донат, подскажите как это сделать?
Вот система казино (кости)
ячейка которая отвечает за выдачу доната [pDonate]
Буду очень благодарен кто поможет!
Вот система казино (кости)
ячейка которая отвечает за выдачу доната [pDonate]
Код:
else if(GetPVarInt(playerid, "ProverkaDice"))
{
if(GetPVarInt(playerid, "KostiName") < 999)
{
if(!PlayerToPoint(30.0,playerid,1130.7448,-1.4491,1000.6797)) return SendClientMessage(playerid, COLOR_WHITE, "Āū äīėęķū ķąõīäčņüń˙ ā źąēčķī!");
new dice = random(12)+1;
new dice1 = random(12)+1;
string="";
format(string, MAX_STR, "%s č %s įšīńčėč źīńņč. Šåēóėüņąņ: {CC9900}%i:%i",PlayerInfo[GetPVarInt(playerid, "KostiName")][pNames],PlayerInfo[playerid][pNames],dice,dice1);
ProxDetector(5.0, playerid, string, 0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF,0xDD90FFFF);
if(dice > dice1)
{
Hook_GivePlayerMoney(playerid, -GetPVarInt(playerid, "KostiMoney"));
Hook_GivePlayerMoney(GetPVarInt(playerid, "KostiName"), GetPVarInt(playerid, "KostiMoney"));
SendClientMessage(GetPVarInt(playerid, "KostiName"), COLOR_GREEN, "Ļīēäšąāė˙åģ, Āū āūčćšąėč!");
SendClientMessage(playerid, COLOR_SERVER, "Ź ńīęąėåķčž, Āū ļšīčćšąėč!");
format(string, SMALL_SIZE, "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), string, 3000, 1);
format(string, SMALL_SIZE, "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, string, 3000, 1);
format(string,SMALL_SIZE, "Āūļąėī: %i",dice1);
SetPlayerChatBubble(playerid,string,COLOR_SERVER,30.0,10000);
format(string,SMALL_SIZE, "Āūļąėī: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),string,TEAM_GROVE_COLOR,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimerEx("DiceOff",5000,0,"i",playerid), SetPVarInt(playerid, "OpustitRuki", 1);
SetTimerEx("DiceOff",5000,0,"i",GetPVarInt(playerid, "KostiName")), SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
DeletePVar(playerid, "ZapretDice");
DeletePVar(GetPVarInt(playerid, "KostiName"), "ZapretDice");
SetPVarInt(playerid, "KostiMoney",0);
DeletePVar(playerid, "ProverkaDice");
SetPVarInt(playerid, "KostiName",999);
}
else if(dice < dice1)
{
Hook_GivePlayerMoney(GetPVarInt(playerid, "KostiName"), -GetPVarInt(playerid, "KostiMoney"));
Hook_GivePlayerMoney(playerid, GetPVarInt(playerid, "KostiMoney"));
SendClientMessage(playerid, COLOR_GREEN, "Ļīēäšąāė˙åģ, Āū āūčćšąėč!");
SendClientMessage(GetPVarInt(playerid, "KostiName"), COLOR_SERVER, "Ź ńīęąėåķčž, Āū ļšīčćšąėč!");
format(string, SMALL_SIZE, "~g~+%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(playerid, string, 3000, 1);
format(string, SMALL_SIZE, "~r~-%d$", GetPVarInt(playerid, "KostiMoney"));
GameTextForPlayer(GetPVarInt(playerid, "KostiName"), string, 3000, 1);
format(string,SMALL_SIZE, "Āūļąėī: %i",dice1);
SetPlayerChatBubble(playerid,string,TEAM_GROVE_COLOR,30.0,10000);
format(string,SMALL_SIZE, "Āūļąėī: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),string,COLOR_SERVER,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimerEx("DiceOff",5000,0,"i",playerid), SetPVarInt(playerid, "OpustitRuki", 1);
SetTimerEx("DiceOff",5000,0,"i",GetPVarInt(playerid, "KostiName")), SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
DeletePVar(playerid, "ZapretDice");
DeletePVar(GetPVarInt(playerid, "KostiName"), "ZapretDice");
DeletePVar(playerid, "KostiMoney");
DeletePVar(playerid, "ProverkaDice");
SetPVarInt(playerid, "KostiName",999);
}
else if(dice == dice1)
{
SendClientMessage(playerid, COLOR_SERVER, "Čćšą ēąźīķ÷čėąńü ā ķč÷üž!");
SendClientMessage(GetPVarInt(playerid, "KostiName"), COLOR_SERVER, "Čćšą ēąźīķ÷čėąńü ā ķč÷üž!");
format(string,SMALL_SIZE, "Āūļąėī: %i",dice1);
SetPlayerChatBubble(playerid,string,COLOR_LIGHTBLUE,30.0,10000);
format(string,SMALL_SIZE, "Āūļąėī: %i",dice);
SetPlayerChatBubble(GetPVarInt(playerid, "KostiName"),string,COLOR_LIGHTBLUE,30.0,10000);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(playerid, 1 , 1851, 1, 0.062397, 0.453746, 0.000000, 0.000000, 94.689308, 0.000000);
ApplyAnimation(GetPVarInt(playerid, "KostiName"),"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject(GetPVarInt(playerid, "KostiName"), 1, 1851, 1, 0.062400, 0.453750, 0.000000, 0.000000, 94.689310, 0.000000);
SetTimerEx("DiceOff",5000,0,"i",playerid), SetPVarInt(playerid, "OpustitRuki", 1);
SetTimerEx("DiceOff",5000,0,"i",GetPVarInt(playerid, "KostiName")), SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki", 1);
SetPVarInt(GetPVarInt(playerid, "KostiName"), "OpustitRuki",1);
dicetime = gettime() + 5;
DeletePVar(playerid, "ZapretDice");
DeletePVar(GetPVarInt(playerid, "KostiName"), "ZapretDice");
DeletePVar(playerid, "KostiMoney");
DeletePVar(playerid, "ProverkaDice");
SetPVarInt(playerid, "KostiName",999);
}
}
}
}
case KEY_NO:
{
if(GetPVarInt(playerid, "InteriorBuy"))
{
DeletePVar(playerid, "Interiors_1"), DeletePVar(playerid, "Interiors"), DeletePVar(playerid, "InteriorBuy");
SpawnPlayer(playerid);
return 1;
}
else if(GetPVarInt(playerid, "ProverkaDice"))
{
if(GetPVarInt(playerid, "KostiName") < 999)
{
DeletePVar(playerid, "ZapretDice");
DeletePVar(GetPVarInt(playerid, "KostiName"), "ZapretDice");
SetPVarInt(playerid, "KostiName",999);
DeletePVar(playerid, "KostiMoney");
DeletePVar(playerid, "ProverkaDice");
SendClientMessage(playerid, -1,"- Āū īņźąēąėčńü īņ ļšåäėīęåķč˙");
SendClientMessage(GetPVarInt(playerid, "KostiName"),-1,"- Čćšīź īņźąēąėń˙ īņ ļšåäėīęåķč˙");
}
}
