Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Не выдает деньги.

Статус
В этой теме нельзя размещать новые ответы.

Rodich

Новичок
Помогите пожалуйста,казино паблик[fs],казик идеально работает но бабки возвращаются в исходняк.
Например у меня было 100к ,я выйграл и у меня осталось 100к,как было так и осталось.

Код:
//CASINO FOUR DRAGONS By Manifest Elgujak
//Ñïàñèáî çà ïîêóïêó ;)

//Äëÿ ðàáîòû ñêèïòà òðåáóåòñÿ ïëàãèí - Streamer
native print(const string[]);
native format(output[], len, const format[], {Float,_}:...);
native SendClientMessage(playerid, color, const message[]);
native GameTextForPlayer(playerid,const string[],time,style);
native SetTimer(funcname[], interval, repeating);
native SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...);
native GetTickCount();
native CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native Text:TextDrawCreate(Float:x, Float:y, text[]);
native TextDrawDestroy(Text:text);
native TextDrawLetterSize(Text:text, Float:x, Float:y);
native TextDrawTextSize(Text:text, Float:x, Float:y);
native TextDrawAlignment(Text:text, alignment);
native TextDrawColor(Text:text, color);
native TextDrawUseBox(Text:text, use);
native TextDrawBoxColor(Text:text, color);
native TextDrawSetShadow(Text:text, size);
native TextDrawSetOutline(Text:text, size);
native TextDrawBackgroundColor(Text:text, color);
native TextDrawFont(Text:text, font);
native TextDrawSetProportional(Text:text, set);
native TextDrawSetSelectable(Text:text, set);
native TextDrawShowForPlayer(playerid, Text:text);
native TextDrawHideForPlayer(playerid, Text:text);
native TextDrawShowForAll(Text:text);
native TextDrawHideForAll(Text:text);
native TextDrawSetString(Text:text, string[]);
native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native SpawnPlayer(playerid);
native SetPlayerPos(playerid, Float:x, Float:y, Float:z);
native SetPlayerFacingAngle(playerid,Float:ang);
native SetPlayerInterior(playerid,interiorid);
native SetPlayerVirtualWorld(playerid, worldid);
native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius);
native GetPlayerVirtualWorld(playerid);
native GetPlayerSkin(playerid);
native SetPlayerSkin(playerid, skinid);
native GetPlayerName(playerid, const name[], len);
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z);
native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, text[]);
native PlayerTextDrawDestroy(playerid, PlayerText:text);
native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y);
native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:x, Float:y);
native PlayerTextDrawAlignment(playerid, PlayerText:text, alignment);
native PlayerTextDrawColor(playerid, PlayerText:text, color);
native PlayerTextDrawUseBox(playerid, PlayerText:text, use);
native PlayerTextDrawBoxColor(playerid, PlayerText:text, color);
native PlayerTextDrawSetShadow(playerid, PlayerText:text, size);
native PlayerTextDrawSetOutline(playerid, PlayerText:text, size);
native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, color);
native PlayerTextDrawFont(playerid, PlayerText:text, font);
native PlayerTextDrawSetProportional(playerid, PlayerText:text, set);
native PlayerTextDrawSetSelectable(playerid, PlayerText:text, set);
native PlayerTextDrawShow(playerid, PlayerText:text);
native PlayerTextDrawHide(playerid, PlayerText:text);
native PlayerTextDrawSetString(playerid, PlayerText:text, string[]);
native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex);
native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0);
native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, color1, color2);
native SetPVarInt(playerid, varname[], int_value);
native GetPVarInt(playerid, varname[]);
native SetPVarString(playerid, varname[], string_value[]);
native GetPVarString(playerid, varname[], string_return[], len);
native SetPVarFloat(playerid, varname[], Float:float_value);
native Float:GetPVarFloat(playerid, varname[]);
native DeletePVar(playerid, varname[]);
native IsPlayerConnected(playerid);
native IsPlayerInVehicle(playerid, vehicleid);
native IsPlayerInAnyVehicle(playerid);
native IsPlayerInCheckpoint(playerid);
native IsPlayerInRaceCheckpoint(playerid);
native SelectTextDraw(playerid, hovercolor);
native CancelSelectTextDraw(playerid);
native strlen(const string[]);
native strpack(dest[], const source[], maxlength=sizeof dest);
native strunpack(dest[], const source[], maxlength=sizeof dest);
native strcat(dest[], const source[], maxlength=sizeof dest);
native strmid(dest[], const source[], start, end, maxlength=sizeof dest);
native bool: strins(string[], const substr[], pos, maxlength=sizeof string);
native bool: strdel(string[], start, end);
native strcmp(const string1[], const string2[], bool:ignorecase=false, length=cellmax);
native strfind(const string[], const sub[], bool:ignorecase=false, pos=0);
native strval(const string[]);
native gettime(&hour=0, &minute=0, &second=0);
native getdate(&year=0, &month=0, &day=0);
native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
native tickcount(&granularity=0);
native numargs();
native random(max);
native SetCameraBehindPlayer(playerid);
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0);
enum floatround_method
{
	floatround_round,
	floatround_floor,
	floatround_ceil,
	floatround_tozero,
	floatround_unbiased
}
enum anglemode
{
	radian,
	degrees,
	grades
}
native Float:float(value);
native Float:floatstr(const string[]);
native Float:floatmul(Float:oper1, Float:oper2);
native Float:floatdiv(Float:dividend, Float:divisor);
native Float:floatadd(Float:oper1, Float:oper2);
native Float:floatsub(Float:oper1, Float:oper2);
native Float:floatfract(Float:value);
native floatround(Float:value, floatround_method:method=floatround_round);
native floatcmp(Float:oper1, Float:oper2);
native Float:floatsqroot(Float:value);
native Float:floatpower(Float:value, Float:exponent);
native Float:floatlog(Float:value, Float:base=10.0);
native Float:floatsin(Float:value, anglemode:mode=radian);
native Float:floatcos(Float:value, anglemode:mode=radian);
native Float:floattan(Float:value, anglemode:mode=radian);
native Float:floatabs(Float:value);
#pragma rational Float
native Float:operator*(Float:oper1, Float:oper2) = floatmul;
native Float:operator/(Float:oper1, Float:oper2) = floatdiv;
native Float:operator+(Float:oper1, Float:oper2) = floatadd;
native Float:operator-(Float:oper1, Float:oper2) = floatsub;
native Float:operator=(oper) = float;
native CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
native SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime);
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
native ClearAnimations(playerid, forcesync = 0);
native KillTimer(timerid);
native GetPlayerState(playerid);

stock Float:operator++(Float:oper) return oper+1.0;
stock Float:operator--(Float:oper) return oper-1.0;
stock Float:operator-(Float:oper) return oper^Float:cellmin;
stock Float:operator*(Float:oper1, oper2) return floatmul(oper1, float(oper2));
stock Float:operator/(Float:oper1, oper2) return floatdiv(oper1, float(oper2));
stock Float:operator/(oper1, Float:oper2) return floatdiv(float(oper1), oper2);
stock Float:operator+(Float:oper1, oper2) return floatadd(oper1, float(oper2));
stock Float:operator-(Float:oper1, oper2) return floatsub(oper1, float(oper2));
stock Float:operator-(oper1, Float:oper2) return floatsub(float(oper1), oper2);
stock bool:operator==(Float:oper1, Float:oper2) return floatcmp(oper1, oper2) == 0;
stock bool:operator==(Float:oper1, oper2) return floatcmp(oper1, float(oper2)) == 0;
stock bool:operator!=(Float:oper1, Float:oper2) return floatcmp(oper1, oper2) != 0;
stock bool:operator!=(Float:oper1, oper2) return floatcmp(oper1, float(oper2)) != 0;
stock bool:operator>(Float:oper1, Float:oper2) return floatcmp(oper1, oper2) > 0;
stock bool:operator>(Float:oper1, oper2) return floatcmp(oper1, float(oper2)) > 0;
stock bool:operator>(oper1, Float:oper2) return floatcmp(float(oper1), oper2) > 0;
stock bool:operator>=(Float:oper1, Float:oper2) return floatcmp(oper1, oper2) >= 0;
stock bool:operator>=(Float:oper1, oper2) return floatcmp(oper1, float(oper2)) >= 0;
stock bool:operator>=(oper1, Float:oper2) return floatcmp(float(oper1), oper2) >= 0;
stock bool:operator<(Float:oper1, Float:oper2) return floatcmp(oper1, oper2) < 0;
stock bool:operator<(Float:oper1, oper2) return floatcmp(oper1, float(oper2)) < 0;
stock bool:operator<(oper1, Float:oper2) return floatcmp(float(oper1), oper2) < 0;
stock bool:operator<=(Float:oper1, Float:oper2) return floatcmp(oper1, oper2) <= 0;
stock bool:operator<=(Float:oper1, oper2) return floatcmp(oper1, float(oper2)) <= 0;
stock bool:operator<=(oper1, Float:oper2) return floatcmp(float(oper1), oper2) <= 0;
stock bool:operator!(Float:oper) return (_:oper & cellmax) == 0;
#define MAX_PLAYER_NAME							(24)
#define MAX_PLAYERS								(1000)
#define PB:%0(%1)								forward %0(%1); public %0(%1)
#define DIALOG_STYLE_MSGBOX						0
#define DIALOG_STYLE_INPUT						1
#define DIALOG_STYLE_LIST						2
#define DIALOG_STYLE_PASSWORD					3
#define KEY_ACTION								(1)
#define KEY_CROUCH								(2)
#define KEY_FIRE								(4)
#define KEY_SPRINT								(8)
#define KEY_SECONDARY_ATTACK					(16)
#define KEY_JUMP								(32)
#define KEY_LOOK_RIGHT							(64)
#define KEY_HANDBRAKE							(128)
#define KEY_LOOK_LEFT							(256)
#define KEY_SUBMISSION							(512)
#define KEY_LOOK_BEHIND							(512)
#define KEY_WALK								(1024)
#define KEY_ANALOG_UP							(2048)
#define KEY_ANALOG_DOWN							(4096)
#define KEY_ANALOG_LEFT							(8192)
#define KEY_ANALOG_RIGHT						(16384)
#define KEY_YES									(65536)
#define KEY_NO									(131072)
#define KEY_CTRL_BACK							(262144)
#define KEY_UP									(-128)
#define KEY_DOWN								(128)
#define KEY_LEFT								(-128)
#define KEY_RIGHT								(128)
#define INVALID_PLAYER_ID						(0xFFFF)
#define INVALID_TEXT_DRAW 						(0xFFFF)
#define PLAYER_STATE_ONFOOT						1
#define dynamic 33233

forward operator%(Float:oper1, Float:oper2);
forward operator%(Float:oper1, oper2);
forward operator%(oper1, Float:oper2);

#define MAX_BONE 14
enum caInfo
{
	caID,
	caName[64],
	caMafia,
	caManager[32],
	caManager2[32],
	caManager3[32],
	caKrupie[32],
	caKrupie2[32],
	caKrupie3[32],
	caKrupie4[32],
	caKrupie5[32],
	caKrupie6[32],
	caKrupie7[32],
	caKrupie8[32],
	caKrupie9[32],
	caKrupie10[32],
Float:caPos[3],
}
enum Bones
{
	Gamer[5],
	Bet,
	bBank,
	Crupie,
	GameStart
}
enum plInfo
{
	pName[24]
}
new
CasinoInfo[3][caInfo],
BoneInfo[MAX_BONE+1][Bones],
PTEMP[MAX_PLAYERS][plInfo],
PlayerText:PlayerBone[MAX_PLAYERS][4],
Text:Bone[4],
Float:BoneCoor[MAX_BONE][4] ={
	{1028.4792,-1092.7213,2193.1750,90.00},{1028.4792,-1092.7213,2193.1750,90.00},
	{1014.8037,-1094.2357,2193.5186,90.00},{1014.8037,-1094.2357,2193.5186,90.00},
	{1938.19,1017.70,992.00,90.00},{1938.19,1025.00,992.00,90.00},
	{1013.8855,-1098.5291,2193.0049,90.00},{1013.8855,-1098.5291,2193.0049,90.00},
	{2251.01,1595.78,1005.70,90.00},{2257.01,1595.78,1005.70,90.00},
	{2266.01,1589.78,1005.70,90.00},{2272.01,1589.78,1005.70,90.00},
	{2266.01,1595.78,1005.70,90.00},{2272.01,1595.78,1005.70,90.00}
};

PB:OnFilterScriptInit()
{
	//================================[ Casino ]================================

	//==========================================================================
	// Êîñòè
	Bone[0] = TextDrawCreate(595.147888, 142.666656, "usebox");
	TextDrawLetterSize(Bone[0], 0.000000, 18.155559);
	TextDrawTextSize(Bone[0], 519.464111, 0.000000);
	TextDrawAlignment(Bone[0], 1);
	TextDrawColor(Bone[0], 0);
	TextDrawUseBox(Bone[0], true);
	TextDrawBoxColor(Bone[0], 1128481664);
	TextDrawSetShadow(Bone[0], 0);
	TextDrawSetOutline(Bone[0], 0);
	TextDrawBackgroundColor(Bone[0], -1751672960);
	TextDrawFont(Bone[0], 0);

	Bone[1] = TextDrawCreate(557.540405, 251.999969, "SET_BET");
	TextDrawLetterSize(Bone[1], 0.429852, 1.360828);
	TextDrawTextSize(Bone[1], 8.721603, 61.250003);
	TextDrawAlignment(Bone[1], 2);
	TextDrawColor(Bone[1], -1347440641);
	TextDrawUseBox(Bone[1], true);
	TextDrawBoxColor(Bone[1], 555819408);
	TextDrawSetShadow(Bone[1], 0);
	TextDrawSetOutline(Bone[1], 1);
	TextDrawBackgroundColor(Bone[1], 51);
	TextDrawFont(Bone[1], 1);
	TextDrawSetProportional(Bone[1], 1);
	TextDrawSetSelectable(Bone[1], true);

	Bone[2] = TextDrawCreate(557.540710, 270.666656, "DICE");
	TextDrawLetterSize(Bone[2], 0.429852, 1.360828);
	TextDrawTextSize(Bone[2], 8.721603, 61.250003);
	TextDrawAlignment(Bone[2], 2);
	TextDrawColor(Bone[2], -1347440641);
	TextDrawUseBox(Bone[2], true);
	TextDrawBoxColor(Bone[2], 555819392);
	TextDrawSetShadow(Bone[2], 0);
	TextDrawSetOutline(Bone[2], 1);
	TextDrawBackgroundColor(Bone[2], 51);
	TextDrawFont(Bone[2], 1);
	TextDrawSetProportional(Bone[2], 1);
	TextDrawSetSelectable(Bone[2], true);

	Bone[3] = TextDrawCreate(557.540283, 289.333312, "EXIT");
	TextDrawLetterSize(Bone[3], 0.429852, 1.360828);
	TextDrawTextSize(Bone[3], 8.721603, 61.250003);
	TextDrawAlignment(Bone[3], 2);
	TextDrawColor(Bone[3], -1347440641);
	TextDrawUseBox(Bone[3], true);
	TextDrawBoxColor(Bone[3], 555819392);
	TextDrawSetShadow(Bone[3], 0);
	TextDrawSetOutline(Bone[3], 1);
	TextDrawBackgroundColor(Bone[3], 51);
	TextDrawFont(Bone[3], 1);
	TextDrawSetProportional(Bone[3], 1);
	TextDrawSetSelectable(Bone[3], true);

	CreateObject(1824,1944.19,1010.90,992.00,0.0,0.0,90.00);
	CreateObject(1824,1944.19,1017.70,992.00,0.0,0.0,90.00);
	CreateObject(1824,1944.19,1025.00,992.00,0.0,0.0,90.00);
	CreateObject(1824,1938.19,1010.90,992.00,0.0,0.0,90.00);
	CreateObject(1824,1938.19,1017.70,992.00,0.0,0.0,90.00);
	CreateObject(1824,1938.19,1025.00,992.00,0.0,0.0,90.00);
	CreateObject(1824,2251.01,1589.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2257.01,1589.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2251.01,1595.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2257.01,1595.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2266.01,1589.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2272.01,1589.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2266.01,1595.78,1005.70,0.0,0.0,90.00);
	CreateObject(1824,2272.01,1595.78,1005.70,0.0,0.0,90.00);
	for(new i; i < MAX_BONE; i++)
	{
		//CreateObject(1824,BoneCoor[i][0],BoneCoor[i][1],BoneCoor[i][2],0.0,0.0,BoneCoor[i][3]);
		BoneInfo[i][Crupie] = INVALID_PLAYER_ID;
		for(new idx= 0; idx < 5; idx++) BoneInfo[i][Gamer][idx] = INVALID_PLAYER_ID;
		BoneInfo[i][GameStart] = 0;
	}

}

PB:BoneTimer() //åæåñåêóíäíûé òàéìåð
{
	for(new i;i<MAX_BONE;i++)
	{
		if(BoneInfo[i][GameStart] > 0)
		{
			BoneInfo[i][GameStart] --;
			new texts[64];
			for(new g = 0; g < MAX_PLAYERS; g++)
			{
				if(GetPVarInt(g,"BoneStol")-1 == i && (GetPVarInt(g,"BoneStol_") || BoneInfo[i][Crupie] == g))
				{
					if(BoneInfo[i][GameStart] == 0 && GetPVarInt(g,"BoneStol_") == 1) SetPVarInt(g,"BoneStol_",random(11) + 2), UpdateBone(i);
					else if(BoneInfo[i][GameStart] > 0)
					{
						format(texts,18,"~g~%i",BoneInfo[i][GameStart]);
						GameTextForPlayer(g,texts,1200,6);
					}
				}
			}
			if(BoneInfo[i][GameStart] == 0) return ShowItog(i);
		}
	}
	return 0;
}

PB:OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	for(new i=0;i<strlen(inputtext);i++)if(inputtext[i]=='%')inputtext[i]='#';
	while(strfind(inputtext,"%s",true)!=-1)
	{
		strdel(inputtext,strfind(inputtext,"%s",true),strfind(inputtext,"%s",true)+2);
	}
	while(strfind(inputtext,"%",true)!=-1)
	{
		strdel(inputtext,strfind(inputtext,"%",true),strfind(inputtext,"%",true)+2);
	}
	if(dialogid == 1122)
	{
		if(!response) return true;
		return ExitBone(playerid);
	}
	if(dialogid == 2233)
	{
		if(!response) return true;
		if(strval(inputtext) < 1000 || strval(inputtext) > 30000000) return SendClientMessage(playerid,0xAFAFAFAA,"Íåâåðíàÿ ñòàâêà");
		new null = 0;
		for(new i; i < 5; i++) if(GetPVarInt(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i],"BoneStol_")) null++;
		if(null > 0) return SendClientMessage(playerid,0xAFAFAFAA,"Êòî òî èç èãðîêîâ óæå ïîñòàâèë ñòàâêó");
		if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] != 0) return SendClientMessage(playerid,0xAFAFAFAA,"Âû íå ìîæåòå èçìåíèòü ñòàâêó â ïðîöåññå èãðû!");
		BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet] = strval(inputtext);
		SendClientMessage(playerid,0xE0E0E0FF,"Ñòàâêà óñïåøíî óñòàíîâëåíà!");
		return UpdateBone(GetPVarInt(playerid,"BoneStol")-1);
	}
	while(strfind(inputtext,"%s",true)!=-1) strdel(inputtext,strfind(inputtext,"%s",true),strfind(inputtext,"%s",true)+2);
	return true;
}

PB:OnPlayerConnect(playerid)
{
	//=========================== Êàçèíî 4 Äðàêîíà =============================//
	//---Êîñòè
	PlayerBone[playerid][0] = CreatePlayerTextDraw(playerid, 556.603332, 142.333358, "Table_1");
	PlayerTextDrawLetterSize(playerid, PlayerBone[playerid][0], 0.491228, 1.524165);
	PlayerTextDrawAlignment(playerid, PlayerBone[playerid][0], 2);
	PlayerTextDrawColor(playerid, PlayerBone[playerid][0], 548012031);
	PlayerTextDrawUseBox(playerid, PlayerBone[playerid][0], true);
	PlayerTextDrawBoxColor(playerid, PlayerBone[playerid][0], 0);
	PlayerTextDrawSetShadow(playerid, PlayerBone[playerid][0], 0);
	PlayerTextDrawSetOutline(playerid, PlayerBone[playerid][0], 1);
	PlayerTextDrawBackgroundColor(playerid, PlayerBone[playerid][0], 51);
	PlayerTextDrawFont(playerid, PlayerBone[playerid][0], 0);
	PlayerTextDrawSetProportional(playerid, PlayerBone[playerid][0], 1);

	PlayerBone[playerid][1] = CreatePlayerTextDraw(playerid, 527.309020, 163.916000, "John_Turner~n~Andriano_Marez~n~Carl_Matador~n~--~n~--");
	PlayerTextDrawLetterSize(playerid, PlayerBone[playerid][1], 0.175188, 1.010665);
	PlayerTextDrawAlignment(playerid, PlayerBone[playerid][1], 1);
	PlayerTextDrawColor(playerid, PlayerBone[playerid][1], -1347440641);
	PlayerTextDrawUseBox(playerid, PlayerBone[playerid][1], true);
	PlayerTextDrawBoxColor(playerid, PlayerBone[playerid][1], 0);
	PlayerTextDrawSetShadow(playerid, PlayerBone[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, PlayerBone[playerid][1], 1);
	PlayerTextDrawBackgroundColor(playerid, PlayerBone[playerid][1], 51);
	PlayerTextDrawFont(playerid, PlayerBone[playerid][1], 1);
	PlayerTextDrawSetProportional(playerid, PlayerBone[playerid][1], 1);

	PlayerBone[playerid][2] = CreatePlayerTextDraw(playerid, 585.057067, 165.082687, "++~n~--~n~++~n~--~n~--");
	PlayerTextDrawLetterSize(playerid, PlayerBone[playerid][2], 0.175188, 1.010665);
	PlayerTextDrawAlignment(playerid, PlayerBone[playerid][2], 2);
	PlayerTextDrawColor(playerid, PlayerBone[playerid][2], -1347440641);
	PlayerTextDrawUseBox(playerid, PlayerBone[playerid][2], true);
	PlayerTextDrawBoxColor(playerid, PlayerBone[playerid][2], 0);
	PlayerTextDrawSetShadow(playerid, PlayerBone[playerid][2], 0);
	PlayerTextDrawSetOutline(playerid, PlayerBone[playerid][2], 1);
	PlayerTextDrawBackgroundColor(playerid, PlayerBone[playerid][2], 51);
	PlayerTextDrawFont(playerid, PlayerBone[playerid][2], 1);
	PlayerTextDrawSetProportional(playerid, PlayerBone[playerid][2], 1);

	PlayerBone[playerid][3] = CreatePlayerTextDraw(playerid, 527.086486, 214.666687, "Bet:_100000~n~Bank:_200000~n~Money:_330500");
	PlayerTextDrawLetterSize(playerid, PlayerBone[playerid][3], 0.186432, 1.115664);
	PlayerTextDrawAlignment(playerid, PlayerBone[playerid][3], 1);
	PlayerTextDrawColor(playerid, PlayerBone[playerid][3], -1347440641);
	PlayerTextDrawSetShadow(playerid, PlayerBone[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, PlayerBone[playerid][3], 1);
	PlayerTextDrawBackgroundColor(playerid, PlayerBone[playerid][3], 51);
	PlayerTextDrawFont(playerid, PlayerBone[playerid][3], 1);
	PlayerTextDrawSetProportional(playerid, PlayerBone[playerid][3], 1);
	//--------delete casino 4 dragons objects
	RemoveBuildingForPlayer(playerid, 2786, 1968.7344, 1029.6641, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1967.4063, 1029.6563, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1968.7344, 1021.6875, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1967.4063, 1021.6875, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1968.7344, 1014.0000, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1967.4063, 1014.0000, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1968.7344, 1006.3438, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1967.4063, 1006.3438, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1941.0234, 1014.2266, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1939.6953, 1014.2188, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1941.0234, 1021.4141, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1939.6953, 1021.4141, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1941.8438, 1029.1328, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1940.5547, 1029.4766, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1942.1250, 1006.5703, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2786, 1940.8828, 1006.1094, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 1895, 1938.0469, 986.6250, 992.8828, 0.25);
	RemoveBuildingForPlayer(playerid, 1895, 1940.6875, 989.1719, 992.8828, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1940.8828, 1006.1094, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2098, 1941.5234, 1006.3828, 993.4141, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1942.1250, 1006.5703, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 1895, 1943.2188, 986.5234, 992.8828, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1939.6953, 1014.2188, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2098, 1940.3906, 1014.2031, 993.4141, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1941.0234, 1014.2266, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1939.6953, 1021.4141, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2098, 1940.3906, 1021.4141, 993.4141, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1941.0234, 1021.4141, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 14568, 1953.6797, 994.2813, 992.9219, 0.25);
	RemoveBuildingForPlayer(playerid, 14566, 1954.3984, 994.9922, 992.9219, 0.25);
	RemoveBuildingForPlayer(playerid, 14567, 1955.1172, 995.7109, 992.9219, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1957.4453, 987.6719, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1957.7188, 987.1953, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 1978, 1959.3984, 1010.1172, 992.5078, 0.25);
	RemoveBuildingForPlayer(playerid, 2188, 1960.3672, 1015.6641, 992.4688, 0.25);
	RemoveBuildingForPlayer(playerid, 2188, 1960.3672, 1020.1719, 992.4688, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1961.9609, 992.2031, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1962.4063, 991.8750, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2188, 1962.3438, 1015.6641, 992.4688, 0.25);
	RemoveBuildingForPlayer(playerid, 2188, 1962.3438, 1020.1797, 992.4688, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1964.5703, 998.4531, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1965.1016, 998.3047, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 1978, 1963.7109, 1010.1172, 992.5078, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1967.4063, 1014.0000, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1967.4063, 1006.3438, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1968.7344, 1006.3438, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1968.7344, 1014.0000, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1967.4063, 1021.6875, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1968.7344, 1021.6875, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1940.5547, 1029.4766, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2098, 1941.2188, 1029.2969, 993.4141, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1941.8438, 1029.1328, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 1978, 1959.3984, 1025.6953, 992.5078, 0.25);
	RemoveBuildingForPlayer(playerid, 1978, 1963.7109, 1025.6953, 992.5078, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1967.4063, 1029.6563, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2785, 1968.7344, 1029.6641, 992.3125, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1964.5469, 1037.2813, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1965.0938, 1037.3516, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1961.9219, 1043.3594, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1962.3984, 1043.6328, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1957.3203, 1047.9766, 992.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 2325, 1957.6563, 1048.4141, 992.9844, 0.25);
	//============================================================================
	GetPlayerName(playerid, PTEMP[playerid][pName], MAX_PLAYER_NAME);
	return 0;
}

PB:OnPlayerDisconnect(playerid, reason)
{
	if(GetPVarInt(playerid,"BoneStol")) ExitBone(playerid);
	DeletePVar(playerid,"CasinoRank");
	return 1;
}


PB:offantidm(playerid)
{
	ClearAnimations(playerid, 10);
	return 1;
}
PB:OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_FIRE || (newkeys & KEY_SPRINT && newkeys & KEY_SECONDARY_ATTACK) || (newkeys & 128  && newkeys & 16) || (newkeys & KEY_SPRINT && newkeys & KEY_FIRE ))
	{
		if(IsPlayerInRangeOfPoint(playerid,100.0,1021.9769,-1094.6857,2192.3818))
		{
			ApplyAnimation(playerid,"FAT","IDLE_tired",4.0,1,0,0,0,0,1);
			SetTimerEx("offantidm", 9000, false, "i", playerid);
			return 1;
		}
	}
	if(newkeys == 16)
	{
		if(IsPlayerNearBone(playerid) != -1)
		{
			new null = -1;
			for(new i = 0; i != 5; i++) if(BoneInfo[IsPlayerNearBone(playerid)][Gamer][i] == INVALID_PLAYER_ID) { null = i; break; }
			if(GetPVarInt(playerid,"CasinoRank") && BoneInfo[IsPlayerNearBone(playerid)][Crupie] != INVALID_PLAYER_ID) return SendClientMessage(playerid,0xAFAFAFAA,"Òóò óæå ðàáîòàåò êðóïüå!");
			if(GetPVarInt(playerid,"BoneStol")) return SendClientMessage(playerid,0xAFAFAFAA,"Òû óæå çàðåãèñòðèðîâàí íà äðóãîì ñòîëå!");
			if(null == -1 && !GetPVarInt(playerid,"CasinoRank")) return SendClientMessage(playerid,0xAFAFAFAA,"Çà ýòèì ñòîëîì íåò ñâîáîäíûõ ìåñò!");
			if(!GetPVarInt(playerid,"CasinoRank")) BoneInfo[IsPlayerNearBone(playerid)][Gamer][null] = playerid;
			else BoneInfo[IsPlayerNearBone(playerid)][Crupie] = playerid;
			for(new i; i != 4; i++) TextDrawShowForPlayer(playerid,Bone[i]), PlayerTextDrawShow(playerid,PlayerBone[playerid][i]);
			SetPVarInt(playerid,"BoneStol",IsPlayerNearBone(playerid)+1);
			SelectTextDraw(playerid,0x33AAFFFF);
			return UpdateBone(IsPlayerNearBone(playerid));
		}
	}
	return true;
}

stock SendMes(playerid, color, fstring[], {Float, _}:...)
{
	static const
	STATIC_ARGS = 3;
	new
	n = (numargs() - STATIC_ARGS) * (cellbits / 8);
	if (n)
	{
		new
		message[128],
		arg_start,
		arg_end;
		#emit CONST.alt        fstring
		#emit LCTRL          5
		#emit ADD
		#emit STOR.S.pri        arg_start
		#emit LOAD.S.alt        n
		#emit ADD
		#emit STOR.S.pri        arg_end
		do
		{
			#emit LOAD.I
			#emit PUSH.pri
			arg_end -= (cellbits / 8);
			#emit LOAD.S.pri      arg_end
		}
		while (arg_end > arg_start);
#emit PUSH.S          fstring
#emit PUSH.C          128
#emit PUSH.ADR         message

		n += (cellbits / 8) * 3;
#emit PUSH.S          n
#emit SYSREQ.C         format

		n += (cellbits / 8);
#emit LCTRL          4
#emit LOAD.S.alt        n
#emit ADD
#emit SCTRL          4
		return SendClientMessage(playerid, color, message);
	}
	else return SendClientMessage(playerid, color, fstring);
}
stock strcharsplit(const string[], &index, seperator=' ')
{
	new result[20], i = 0;
	if (index != 0 && string[index] != '\0') index++;
	while (string[index] && string[index] != seperator && string[index] != '\r' && string[index] != '\n')
	{
		result[i++] = string[index++];
	}
	return result;
}

PB:OnPlayerUpdate(playerid)
{
	if(!IsPlayerConnected(playerid)) return true;
	if(GetPVarInt(playerid,"BoneStol")) SelectTextDraw(playerid,0x33AAFFFF);
	if(!GetPVarInt(playerid,"BoneStol") && IsPlayerNearBone(playerid) != -1) GameTextForPlayer(playerid,"~g~PRESS ENTER",1300,4);
	return true;
}

PB:OnPlayerText(playerid, text[])
{
	new stringer[144];
	new sendername[MAX_PLAYER_NAME];
	GetPlayerName(playerid,sendername,sizeof(sendername));
	if(GetPVarInt(playerid,"BoneStol"))
	{
		if(GetPVarInt(playerid,"tkazino") > gettime()) return SendClientMessage(playerid, 0xB2B2B2FF, "Ïîæàëóéñòà, íå ôëóäèòå");
		format(stringer,156,"- %s (%s)[%d]",text,sendername,playerid);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(GetPVarInt(i,"BoneStol") == GetPVarInt(playerid,"BoneStol")) SendClientMessage(i,0x4B00B0AA,stringer);
		}
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
		{
			ApplyAnimation(playerid, "PED", "IDLE_CHAT",4.1,0,1,1,1,1,1);
			SetTimerEx("ClearAnim", 2400, false, "d", playerid);
		}
		SetPlayerChatBubble(playerid, text, 0x6495EDFF, 20.0, 10000);
		SetPVarInt(playerid,"tkazino", gettime() + 2);
		return false;
	}
	else
	{
		format(stringer, sizeof(stringer), "- %s[%d]: %s", sendername,playerid, text);
		SetPlayerChatBubble(playerid, text, 0x6ab1ffaa, 20.0, 10000);
		ProxDetector(9990.0, playerid, stringer,0xE6E6E6E6,0xC8C8C8C8,0xAAAAAAAA,0x8C8C8C8C,0x6E6E6E6E);
	}
	return false;
}
PB:OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(clickedid == Bone[3]) return ShowPlayerDialog(playerid,1122,0,"Ïðåäóïðåæäåíèå","Åñëè âû ñäåëàëè ñòàâêó è èãðà óæå íà÷àëàñü, òî äåíüãè âàì íå âåðíóòñÿ!\nÂû òî÷íî õîòèòå ïîêèíóòü ñòîë?","Îê","Îòìåíà");
	else if(clickedid == Bone[1])
	{
		if(GetPVarInt(playerid,"CasinoRank"))
		{
			new null = 0;
			for(new i; i < 5; i++) if(GetPVarInt(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i],"BoneStol_")) null++;
			if(null > 0) return SendClientMessage(playerid,0xAFAFAFAA,"Â äàííûé ìîìåíò âû íå ìîæåòå èçìåíèòü ñòàâêó!");
			return ShowPlayerDialog(playerid,2233,1,"Óñòàíîâêà ñòàâêè äëÿ èãðû:","Ñòàâêà äîëæíà áûòü íå ìåíåå 1000 âèðò\nè íå áîëåå 30000000 âèðò. Ââåäèòå ñóììó ñòàâêè..","Äàëåå","Îòìåíà");
		}
		if(!BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet]) return SendClientMessage(playerid,0xAFAFAFAA,"Ñòàâêà íå óñòàíîâëåíà!");
		if(GetPVarInt(playerid,"BoneStol_")) return SendClientMessage(playerid,0xAFAFAFAA,"Òû óæå ïîñòàâèë ñòàâêó!");
		if(GetPlayerMoney(playerid) < BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet]) return SendClientMessage(playerid,0xAFAFAFAA,"Íåäîñòàòî÷íî ñðåäñòâ!");
		if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] > 0) return SendClientMessage(playerid,0xAFAFAFAA,"Èãðà óæå çàïóùåíà!");
		GivePlayerMoney(playerid,-BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet]);
		BoneInfo[GetPVarInt(playerid,"BoneStol")-1][bBank] += BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet];
		SetPVarInt(playerid,"BoneStol_",1);
		UpdateBone(GetPVarInt(playerid,"BoneStol")-1);
	}
	else if(clickedid == Bone[2])
	{
		if(GetPVarInt(playerid,"CasinoRank"))
		{
			new null = 0;
			for(new i; i < 5; i++) if(GetPVarInt(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Gamer][i],"BoneStol_")) null++;
			if(null < 2) return SendClientMessage(playerid,0xAFAFAFAA,"Íåõâàòàåò èãðîêîâ äëÿ ñòàðòà!");
			if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] > 0) return SendClientMessage(playerid,0xAFAFAFAA,"Èãðà óæå çàïóùåíà!");
			return BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] = 30;
		}
		else
		{
			if(!GetPVarInt(playerid,"BoneStol_")) return SendClientMessage(playerid,0xAFAFAFAA,"Âû íå ïîñòàâèëè ñòàâêó!");
			if(BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] <= 0) return SendClientMessage(playerid,0xAFAFAFAA,"Â äàííûé ìîìåíò íåëüçÿ êèíóòü êîñòè");
			if(GetPVarInt(playerid,"BoneStol_") > 1) return SendClientMessage(playerid,0xAFAFAFAA,"Âû óæå êèäàëè êóáèêè â ýòîì ðàóíäå!");
			new null = 0;
			SetPVarInt(playerid,"BoneStol_",random(11) + 2);
			UpdateBone(GetPVarInt(playerid,"BoneStol")-1);
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(GetPVarInt(i,"BoneStol") == GetPVarInt(playerid,"BoneStol") && GetPVarInt(i,"BoneStol_") == 1) null++;
			}
			if(!null) BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] = 4;
		}
	}
	else if(_:clickedid == INVALID_TEXT_DRAW)
	{
		if(GetPVarInt(playerid,"BoneStol")) return ShowPlayerDialog(playerid,1122,0,"Ïðåäóïðåæäåíèå","Åñëè âû ñäåëàëè ñòàâêó è èãðà óæå íà÷àëàñü, òî äåíüãè âàì íå âåðíóòñÿ!\nÂû òî÷íî õîòèòå ïîêèíóòü ñòîë?","Îê","Îòìåíà");
	}
	return false;
}
stock GetCasino(playerid, idx)
{
	if(strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caManager],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caManager2],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caManager3],true) == 0) return 2;
	if(strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie2],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie3],true) == 0
			|| strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie4],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie5],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie6],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie7],true) == 0
			|| strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie8],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie9],true) == 0 || strcmp(PTEMP[playerid][pName],CasinoInfo[idx][caKrupie10],true) == 0) return true;
	return false;
}
stock IsPlayerNearBone(playerid)
{
	for(new i; i <sizeof(BoneCoor); i++) if(IsPlayerInRangeOfPoint(playerid, 2.0, BoneCoor[i][0],BoneCoor[i][1],BoneCoor[i][2])) return i;
	return -1;
}
stock UpdateBone(idx)
{
	new strings[200], str[256];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(GetPVarInt(i,"BoneStol")-1 == idx)
		{
			str = "";
			format(strings,40,"Table:_%i",idx+1);
			PlayerTextDrawSetString(i,PlayerBone[i][0],strings);
			format(strings,128,"Bet:_%i~n~Bank:_%i~n~Money:_%i",BoneInfo[idx][Bet],BoneInfo[idx][bBank],GetPlayerMoney(i));
			PlayerTextDrawSetString(i,PlayerBone[i][3],strings);
			for(new i_ = 0; i_ < 5; i_++)
			{
				if(BoneInfo[idx][Gamer][i_] != INVALID_PLAYER_ID) format(strings,128,"%s~n~",PTEMP[BoneInfo[idx][Gamer][i_]][pName]);
				else format(strings,30,"--~n~");
				strcat(str,strings);
			}
			PlayerTextDrawSetString(i,PlayerBone[i][1],str);
			str = "";
			for(new i_ = 0; i_ < 5; i_++)
			{
				if(BoneInfo[idx][Gamer][i_] != INVALID_PLAYER_ID && GetPVarInt(BoneInfo[idx][Gamer][i_],"BoneStol_"))
				{
					if(GetPVarInt(BoneInfo[idx][Gamer][i_],"BoneStol_") == 1) format(strings,128,"++~n~");
					else format(strings,128,"%i~n~",GetPVarInt(BoneInfo[idx][Gamer][i_],"BoneStol_"));
				}
				else format(strings,30,"--~n~");
				strcat(str,strings);
			}
			PlayerTextDrawSetString(i,PlayerBone[i][2],str);
		}
	}
	return true;
}
stock ExitBone(playerid)
{
	new null[2] = 0;
	if(GetPVarInt(playerid,"BoneStol_") && BoneInfo[GetPVarInt(playerid,"BoneStol")-1][GameStart] <= 0)
	{
		GivePlayerMoney(playerid, BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet]);
		BoneInfo[GetPVarInt(playerid,"BoneStol")-1][bBank]-=BoneInfo[GetPVarInt(playerid,"BoneStol")-1][Bet];
	}
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		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;
}
stock ShowItog(idx)
{
	new itog[3] = -1,string[128]; itog[0] = -1; itog[1] = -1; itog[2] = -1;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(GetPVarInt(i,"BoneStol")-1 == idx && GetPVarInt(i,"BoneStol_") > 1 && GetPVarInt(i,"BoneStol_") > itog[0]) itog[0] = GetPVarInt(i,"BoneStol_"), itog[1] = i;
		if(GetPVarInt(i,"BoneStol")-1 == idx && GetPVarInt(i,"BoneStol_") > 1 && i != itog[1] && GetPVarInt(i,"BoneStol_") == itog[0]) itog[2] = i;
	}
	if(itog[2] > -1)
	{
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(GetPVarInt(i,"BoneStol")-1 == idx && GetPVarInt(i,"BoneStol_") > 1 && GetPVarInt(i,"BoneStol_") == itog[0]) SetPVarInt(i,"BoneStol_",1), BoneInfo[idx][GameStart] = 30, SendClientMessage(i,0x4B00B0AA,"Âû ïîïàëè â ñëåäóþùèé ðàóíä. Ó âàñ åñòü 30 ñåêóíä, ÷òîáû áðîñèòü êîñòè");
			else if(GetPVarInt(i,"BoneStol")-1 == idx) DeletePVar(i,"BoneStol_");
		}
		UpdateBone(idx);
	}
	else if(itog[1] > -1)
	{
		format(string,128,"%s ïîáåæäàåò. Êîëëè÷åñòâî î÷êîâ: %i",PTEMP[itog[1]][pName],itog[0]);
		if(BoneInfo[idx][Crupie] != INVALID_PLAYER_ID) GivePlayerMoney(BoneInfo[idx][Crupie],1500);
		GivePlayerMoney(itog[1], BoneInfo[idx][bBank]-(BoneInfo[idx][bBank]/10));
		BoneInfo[idx][GameStart] = 0;
		BoneInfo[idx][Bet] = 0;
		BoneInfo[idx][bBank] = 0;
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(GetPVarInt(i,"BoneStol")-1 == idx)
			{
				SendClientMessage(i,0x4B00B0AA,string);
				DeletePVar(i,"BoneStol_");
			}
		}
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(GetPVarInt(i,"BoneStol")-1 == idx && IsPlayerNearBone(i) != idx) ExitBone(i);
		}
		UpdateBone(idx);
	}
	return true;
}
PB:ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		for(new i; i<MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
				{
					GetPlayerPos(i, posx, posy, posz);
					tempposx = (oldposx -posx);
					tempposy = (oldposy -posy);
					tempposz = (oldposz -posz);
					if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SendClientMessage(i, col1, string);
					else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SendClientMessage(i, col2, string);
					else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SendClientMessage(i, col3, string);
					else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SendClientMessage(i, col4, string);
					else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SendClientMessage(i, col5, string);
				}
				else SendClientMessage(i, col1, string);
			}
		}
	}
	return true;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу