Provjera u MySQL


Započeo Sef, Avgust 12, 2018, 03:18:26 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Sef

*

b]Problem(error/warning): Ovako krenuo sam polako sa prebacivanjem cijelog moda u MySQL medjutim naletio sam na problem kod diler sistema kada igrac kupi od dilera napravljeno je da to sto kupi ide organizaciji i sad u tom functionu je stavljena provjera da li postoji gangzona preko fajla znaci if(fexist(tFile)) i tako provjerava da li postoji id te orge medjutim ja sam vec prebacio gangzone u mysql i sad mene zanima kako bih ja mogao da napravim tu  provjeru za mysql da provjeri da li postoji taj id organizacije od koje je diler? [/b]
Dio skripte:
FUNCTION: DajPareOrgi(playerid, value)
{
	if(GetNearestDealer(playerid) != -1)
	{	
		new teritorija = DilerInfo[GetNearestDealer(playerid)][DilerZone], tFile[50];
		format(tFile, sizeof(tFile), gZone_FILE, teritorija);
		if(fexist(tFile))
		{
		    new orga = gZoneInfo[teritorija][gZoneGangID], oFile[50];
		    format(oFile, sizeof(oFile), O_FILE, orga);
		    if(fexist(oFile) && gZoneInfo[teritorija][gZoneGangID] != 0)
		    {
		        OI[orga][oSafeMoney] += value;
		        new str[120];
		        format(str, sizeof(str), "{95B4A2}DILER: (( {FFFFFF}Diler vaÅ¡e teritorije je prodao neÅ¡to, dobili ste u sef organizacije $%d. {95B4A2}))", value);
		        PorukaOrg(orga, -1, str);
		    }
		}
	}
	return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log)://
Slika/video ingame problema(obavezno ako je ingame problem)://
Poslednja Izmena: Avgust 12, 2018, 22:56:47 POSLE PODNE od Bašovski
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

ne razumem st okoristis file kad ti mysql
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Sef

*

Citat: Skorpija poslato Avgust 12, 2018, 04:41:43 PRE PODNE
ne razumem st okoristis file kad ti mysql
Fino sam rekao prebacujem u mysql i nije mi jasno kako to file sa cime da zamenim u mysqlu kapiras? to fExist mi koristi da provalj kojoj orgi salje pare u sef tako sto ce saznati id bande koja je zauzela teritoriju.. e sad ja nzm kako da zamenim to da bude u mysqlu jer sam prebacio teritorije i orge u mysql
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Citat: Sef poslato Avgust 12, 2018, 04:51:42 PRE PODNE
Fino sam rekao prebacujem u mysql i nije mi jasno kako to file sa cime da zamenim u mysqlu kapiras? to fExist mi koristi da provalj kojoj orgi salje pare u sef tako sto ce saznati id bande koja je zauzela teritoriju.. e sad ja nzm kako da zamenim to da bude u mysqlu jer sam prebacio teritorije i orge u mysql
e sad zavisi koji mysql koristis msm koji plugin koristis imas milion funkcija nzm samo koji plugin koristis 1.
mysql_function_query

2.
mysql_tquery


primer 1:
new test[128];
	format(test, sizeof(test), "SELECT * FROM tablaphyadmin");
	mysql_function_query(tvojubazu, test, true, "Ucitajtest", "");


primer 2:
mysql_tquery(XmySQLDB, "SELECT * FROM `tablaphyadmin` LIMIT "#MAX_KUCA, "sql_test");
Poslednja Izmena: Avgust 12, 2018, 05:02:36 PRE PODNE od Skorpija
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Sef

*

Citat: Skorpija poslato Avgust 12, 2018, 04:59:28 PRE PODNE
e sad zavisi koji mysql koristis msm koji plugin koristis imas milion funkcija nzm samo koji plugin koristis 1.
mysql_function_query

2.
mysql_tquery


primer 1:
new test[128];
	format(test, sizeof(test), "SELECT * FROM tablaphyadmin");
	mysql_function_query(tvojubazu, test, true, "Ucitajtest", "");


primer 2:
mysql_tquery(XmySQLDB, "SELECT * FROM `tablaphyadmin` LIMIT "#MAX_KUCA, "sql_test");

koristim pBlueov r41. da li bi mi mogao sredito ovo gore sto sam poslao i replyovati onds da vidim kako to celo izgleda?
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Mozes poslati ucitavanje orgi ? Posto ne znam na koji nacin ucitavas :)
One And Only
Old Member
Since AVGUST 2013. :)
GAME OVER - SCRIPTING
SINCE 2009 - 2025

Sef

*

Citat: LANMY.pwN poslato Avgust 12, 2018, 10:44:19 PRE PODNE
Mozes poslati ucitavanje orgi ? Posto ne znam na koji nacin ucitavas :)
new q[ 256 ];
	mysql_format( _dbConnector, q, sizeof( q ), "SELECT * FROM organizations" );
	mysql_pquery( _dbConnector, q, "OnOrganizationsLoad" );


forward OnOrganizationsLoad( );
public OnOrganizationsLoad( ) {

	new rows, OrgID, OrgCounter = 1, q[ 128 ];
    cache_get_row_count(rows);

	if( rows ) {
		for( new i = 0; i < rows; i ++ ){

			OrgID = OrgCounter;

            cache_get_value_name_int( i, "org_id", org_info[ OrgID ][ oID ] );
            cache_get_value_name( i, "name", org_info[ OrgID ][ oName ], ORG_IME );
			cache_get_value_name( i, "prefix", org_info[ OrgID ][ oPreFix ], 10 );
			cache_get_value_name( i, "color", org_info[ OrgID ][ oColor ], 24 );

			cache_get_value_name_int( i, "type", org_info[ OrgID ][ oTip ] );
			cache_get_value_name_int( i, "suspended", org_info[ OrgID ][ oSuspended ] );
			cache_get_value_name_int( i, "max_members", org_info[ OrgID ][ oMaxClanova ] );
		    org_info[ OrgID ][ oUbacenihClanova ] = 0;

		    cache_get_value_name_int( i, "male_skin_1", org_info[ OrgID ][ oSkin1 ] );
			cache_get_value_name_int( i, "male_skin_2", org_info[ OrgID ][ oSkin2 ] );
			cache_get_value_name_int( i, "male_skin_3", org_info[ OrgID ][ oSkin3 ] );
			cache_get_value_name_int( i, "male_skin_4", org_info[ OrgID ][ oSkin4 ] );
			cache_get_value_name_int( i, "male_skin_5", org_info[ OrgID ][ oSkin5 ] );
			cache_get_value_name_int( i, "male_skin_6", org_info[ OrgID ][ oSkin6 ] );

			cache_get_value_name_int( i, "female_skin_1", org_info[ OrgID ][ oZSkin1 ] );
			cache_get_value_name_int( i, "female_skin_2", org_info[ OrgID ][ oZSkin2 ] );
			cache_get_value_name_int( i, "female_skin_3", org_info[ OrgID ][ oZSkin3 ] );
			cache_get_value_name_int( i, "female_skin_4", org_info[ OrgID ][ oZSkin4 ] );
			cache_get_value_name_int( i, "female_skin_5", org_info[ OrgID ][ oZSkin5 ] );
			cache_get_value_name_int( i, "female_skin_6", org_info[ OrgID ][ oZSkin6 ] );

            cache_get_value_name( i, "rank_1", org_info[ OrgID ][ oRank1 ], ORG_RANK );
            cache_get_value_name( i, "rank_2", org_info[ OrgID ][ oRank2 ], ORG_RANK );
            cache_get_value_name( i, "rank_3", org_info[ OrgID ][ oRank3 ], ORG_RANK );
            cache_get_value_name( i, "rank_4", org_info[ OrgID ][ oRank4 ], ORG_RANK );
            cache_get_value_name( i, "rank_5", org_info[ OrgID ][ oRank5 ], ORG_RANK );
            cache_get_value_name( i, "rank_6", org_info[ OrgID ][ oRank6 ], ORG_RANK );

			cache_get_value_name_float( i, "enter_pos_x", org_info[ OrgID ][ oPozExtX ] );
			cache_get_value_name_float( i, "enter_pos_y", org_info[ OrgID ][ oPozExtY ]);
			cache_get_value_name_float( i, "enter_pos_z", org_info[ OrgID ][ oPozExtZ ]);

			cache_get_value_name_float( i, "exit_pos_x", org_info[ OrgID ][ oPozIntX ] );
			cache_get_value_name_float( i, "exit_pos_y", org_info[ OrgID ][ oPozIntY ] );
			cache_get_value_name_float( i, "exit_pos_z", org_info[ OrgID ][ oPozIntZ ] );

		    cache_get_value_name_int( i, "interior", org_info[ OrgID ][ oInt ] );
			cache_get_value_name_int( i, "virtualw", org_info[ OrgID ][ oVw ] );

			cache_get_value_name_float( i, "duty_point_pos_x", org_info[ OrgID ][ oDutyPoint ][ 0 ] );
			cache_get_value_name_float( i, "duty_point_pos_y", org_info[ OrgID ][ oDutyPoint ][ 1 ] );
			cache_get_value_name_float( i, "duty_point_pos_z", org_info[ OrgID ][ oDutyPoint ][ 2 ] );
			cache_get_value_name_int( i, "duty_point_int", org_info[ OrgID ][ oDutyInt ] );
			cache_get_value_name_int( i, "duty_point_vw", org_info[ OrgID ][ oDutyVW ] );

			cache_get_value_name_float( i, "equip_point_pos_x", org_info[ OrgID ][ oEquipPoint ][ 0 ] );
			cache_get_value_name_float( i, "equip_point_pos_y", org_info[ OrgID ][ oEquipPoint ][ 1 ] );
			cache_get_value_name_float( i, "equip_point_pos_z", org_info[ OrgID ][ oEquipPoint ][ 2 ] );
			cache_get_value_name_int( i, "equip_point_int", org_info[ OrgID ][ oEquipInt ] );
			cache_get_value_name_int( i, "equip_point_vw", org_info[ OrgID ][ oEquipVW ] );

		    cache_get_value_name_int( i, "savez", org_info[ OrgID ][ oSavez ] );

            cache_get_value_name_float( i, "drug_field_max_x", org_info[ OrgID ][ oDrugFieldMaxX ] );
			cache_get_value_name_float( i, "drug_field_min_x", org_info[ OrgID ][ oDrugFieldMinX ] );
			cache_get_value_name_float( i, "drug_field_max_y", org_info[ OrgID ][ oDrugFieldMaxY ] );
			cache_get_value_name_float( i, "drug_field_min_y", org_info[ OrgID ][ oDrugFieldMinY ] );
			cache_get_value_name_float( i, "drug_field_pos_x", org_info[ OrgID ][ oDrugField ][ 0 ] );
			cache_get_value_name_float( i, "drug_field_pos_y", org_info[ OrgID ][ oDrugField ][ 1 ] );
			cache_get_value_name_float( i, "drug_field_pos_z", org_info[ OrgID ][ oDrugField ][ 2 ] );

			cache_get_value_name_float( i, "safe_pos_x", org_info[ OrgID ][ oSafePos ][ 0 ] );
		 	cache_get_value_name_float( i, "safe_pos_y", org_info[ OrgID ][ oSafePos ][ 1 ] );
			cache_get_value_name_float( i, "safe_pos_z", org_info[ OrgID ][ oSafePos ][ 2 ] );
			cache_get_value_name_int( i, "safe_money", org_info[ OrgID ][ oSafeMoney ] );
			cache_get_value_name_int( i, "safe_drug_amount_1", org_info[ OrgID ][ oSafeDrugAmmount ][ 0 ] );
		 	cache_get_value_name_int( i, "safe_drug_amount_2", org_info[ OrgID ][ oSafeDrugAmmount ][ 1 ] );
			cache_get_value_name_int( i, "safe_drug_amount_3", org_info[ OrgID ][ oSafeDrugAmmount ][ 2 ] );
			cache_get_value_name_int( i, "safe_drug_amount_4", org_info[ OrgID ][ oSafeDrugAmmount ][ 3 ] );
			cache_get_value_name_int( i, "safe_mats", org_info[ OrgID ][ oSafeMats ] );

            new string[ 256 ];
            format( string, sizeof( string ), ""col_white"%s\n{FF6200}Za ulaz u interijer pritisnite\n"col_white"'ENTER'", org_info[ OrgID ][ oName ] );
			Org3D[ OrgID ] = Create3DTextLabel( string, -1, org_info[ OrgID ][ oPozExtX ], org_info[ OrgID ][ oPozExtY ], org_info[ OrgID ][ oPozExtZ ], 25, 0, 1);
           	OrgPickup[ OrgID ] = CreateDynamicPickup(1314, 1, org_info[ OrgID ][ oPozExtX ], org_info[ OrgID ][ oPozExtY ], org_info[ OrgID ][ oPozExtZ ] );

			if( org_info[ OrgID ][ oDutyPoint ][ 0 ] != 0 && org_info[ OrgID ][ oDutyPoint ][ 1 ] != 0 ) {
		        OrgDuty3D[ OrgID ] = CreateDynamic3DTextLabel( ""col_white"[ /undercover ]\n"col_server"[ /duty ]", -1, org_info[ OrgID ][ oDutyPoint ][ 0 ], org_info[ OrgID ][ oDutyPoint ][ 1 ], org_info[ OrgID ][ oDutyPoint ][ 2 ], 5, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, org_info[ OrgID ][ oDutyVW ], org_info[ OrgID ][ oDutyInt ], -1, 20.0);
				DutyPointPickup[ OrgID ] = CreateDynamicPickup( 1239, 1, org_info[ OrgID ][ oDutyPoint ][ 0 ], org_info[ OrgID ][ oDutyPoint ][ 1 ], org_info[ OrgID ][ oDutyPoint ][ 2 ], org_info[ OrgID ][ oDutyVW ], org_info[ OrgID ][ oDutyInt ], -1, 20.0 );
			}

			if( org_info[ OrgID ][ oEquipPoint ][ 0 ] != 0 && org_info[ OrgID ][ oEquipPoint ][ 1 ] != 0 ) {
		        OrgEquip3D[ OrgID ] = CreateDynamic3DTextLabel( ""col_white"Da otvorite meni armorija kucajte\n"col_server"[ /equipment ]", -1, org_info[ OrgID ][ oEquipPoint ][ 0 ], org_info[ OrgID ][ oEquipPoint ][ 1 ], org_info[ OrgID ][ oEquipPoint ][ 2 ], 5, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, org_info[ OrgID ][ oEquipVW ], org_info[ OrgID ][ oEquipInt ], -1, 20.0);
				EquipPointPickup[ OrgID ] = CreateDynamicPickup( 1239, 1, org_info[ OrgID ][ oEquipPoint ][ 0 ], org_info[ OrgID ][ oEquipPoint ][ 1 ], org_info[ OrgID ][ oEquipPoint ][ 2 ], org_info[ OrgID ][ oEquipVW ], org_info[ OrgID ][ oEquipInt ], -1, 20.0 );
			}

			if( org_info[ OrgID ][ oDrugField ][ 0 ] != 0 && org_info[ OrgID ][ oDrugField ][ 1 ] != 0 ) {
				new stringfield[ 128 ];
			    format( stringfield, sizeof( stringfield ), ""col_white"Poljana za sadjenje droge\n"col_server"%s", org_info[ OrgID ][ oName ] );
			    OrgField3d[ OrgID ] = CreateDynamic3DTextLabel( stringfield, -1, org_info[ OrgID ][ oDrugField ][ 0 ], org_info[ OrgID ][ oDrugField ][ 1 ], org_info[ OrgID ][ oDrugField ][ 2 ], 5, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0, -1, 50.0);
				OrgFieldPickup[ OrgID ] = CreateDynamicPickup( 1239, 1, org_info[ OrgID ][ oDrugField ][ 0 ], org_info[ OrgID ][ oDrugField ][ 1 ], org_info[ OrgID ][ oDrugField ][ 2 ], 0, 0, -1, 50.0 );
                org_info[ OrgID ][ oDrugFieldRectAngle ] = CreateDynamicRectangle( org_info[ OrgID ][ oDrugFieldMinX ], org_info[ OrgID ][ oDrugFieldMinY ], org_info[ OrgID ][ oDrugFieldMaxX ], org_info[ OrgID ][ oDrugFieldMaxY ], -1, -1, -1 );
			}

			if( org_info[ OrgID ][ oSafePos ][ 0 ] != 0 && org_info[ OrgID ][ oSafePos ][ 1 ] != 0 ) {
				new stringsafe[ 128 ];
			    format( stringsafe, sizeof( stringsafe ), ""col_white"Sef za koriscenje /orgsef\n"col_server"%s", org_info[ OrgID ][ oName ] );
			    OrgSafe3d[ OrgID ] = CreateDynamic3DTextLabel( stringsafe, -1, org_info[ OrgID ][ oSafePos ][ 0 ], org_info[ OrgID ][ oSafePos ][ 1 ], org_info[ OrgID ][ oSafePos ][ 2 ], 5, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, org_info[ OrgID ][ oVw ], org_info[ OrgID ][ oInt ], -1, 20.0);
				OrgSafePickup[ OrgID ] = CreateDynamicPickup( 1239, 1, org_info[ OrgID ][ oSafePos ][ 0 ], org_info[ OrgID ][ oSafePos ][ 1 ], org_info[ OrgID ][ oSafePos ][ 2 ], org_info[ OrgID ][ oVw ], org_info[ OrgID ][ oInt ], -1, 20.0 );
			}

			org_info[ OrgID ][ oMaxPort ] = 0;

			mysql_format( _dbConnector, q, sizeof( q ), "SELECT * FROM org_ports WHERE org_id = '%d'", org_info[ OrgID ][ oID ] );
			mysql_pquery( _dbConnector, q, "OnOrganizationPortsLoad", "i", OrgID );

			OrgCounter++;
		}

	    new qa[ 256 ];
	    mysql_format( _dbConnector, qa, sizeof( qa ), "SELECT * FROM `vehicles` WHERE `v_usage` != '1' ORDER BY veh_id ASC" );
		mysql_pquery( _dbConnector, qa, "OnVehiclesLoad");

		new done = false;
		for( new orgica = 1; orgica < MAX_ORG; orgica++ ) {
			for( new j = 0; j < 52; j++ ) {

	        	org_members_info[ orgica ][ j ][ o_m_type ] = 0;
	      		strmid( org_members_info[ orgica ][ j ][ o_m_Name ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
	    		org_members_info[ orgica ][ j ][ o_m_sqlID ] = 0;
	    		if( j == 31 ) done = true;
			}
		}
		if( done ) {
			mysql_format( _dbConnector, qa, sizeof( qa ), "SELECT org_members.org_id, org_members.memb_rank, org_members.memb_type, org_members.memb_sqlID, users.p_name \
														FROM org_members \
														INNER JOIN users \
														ON org_members.memb_sqlID = users.user_id" );
			mysql_pquery( _dbConnector, qa, "OnOrgMembersLoad" );
		}
	}
	else {
	    //------[Vozila]------
	    new qa[ 256 ];
	    mysql_format( _dbConnector, qa, sizeof( qa ), "SELECT * FROM `vehicles` WHERE `v_usage` != '1' ORDER BY veh_id ASC" );
		mysql_pquery( _dbConnector, qa, "OnVehiclesLoad");
	}
	return (true);
}

i imam jos problem kod kreiranja dilera trazi id teritorije
  			oFile[50];
			format(oFile, sizeof(oFile), FILE_GZONE, strval(inputtext));
			if(!fexist(oFile)) return SPD(playerid, dialog_DEALERZONE, DSI, ""server_boja"Server - Diler:", "{FF0000}Ta treitorija ne postoji.\n{FFFFFF}Upišite ID teritorije za dilera:", D_ODABERI, D_ODUSTANI);
Kako da ovo prebacim takodje da prepoznaje u mysql?
Poslednja Izmena: Avgust 12, 2018, 11:04:32 PRE PODNE od Sef
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Sef

*

Eh ovako, Izvinjavam se na bumpanju ali ne mogu edit zadnji komentar.
Sredio sam nesto kako mi je @Skorpija objasnio i sad meni fino radi sve medjutim zbog nekog razloga mi izbacuje sscanf warning: String buffer overflow.
Evo koda koji sam ja uredjivao
FUNCTION: DilerDajPareOrgi(playerid, value)
{
	if(GetNearestDealer(playerid) != -1)
	{	
		new teritorija = DilerInfo[GetNearestDealer(playerid)][DilerZone];
		if( mysql_tquery( _dbConnector, "SELECT * FROM `gangzones` LIMIT "#MAX_GZONE, "teritorija" ) )
		{
		    new orga = gZoneInfo[teritorija][gZoneGangID];
		    if( mysql_tquery( _dbConnector, "SELECT * FROM `organizations` LIMIT "#MAX_ORG, "orga" ) )
		    {
		        org_info[orga][oSafeMoney] += value;
		        sql_organization_update_integer( orga, "safe_money", org_info[orga][oSafeMoney] );
		        new str[128];
		        format(str, sizeof(str), "{95B4A2}DILER: (( {FFFFFF}Diler vaÅ¡e teritorije je prodao neÅ¡to, dobili ste u sef organizacije $%d. {95B4A2}))", value);
		        OrgPoruka(orga, -1, str);
		    }
		}
	}
	return 1;
}

I takodje za ovo nisam nasao resenje
oFile[50];
format(oFile, sizeof(oFile), FILE_GZONE, strval(inputtext));
if(!fexist(oFile)) return SPD(playerid, dialog_DEALERZONE, DSI, ""server_boja"Server - Diler:", "{FF0000}Ta treitorija ne postoji.\n{FFFFFF}Upišite ID teritorije za dilera:", D_ODABERI, D_ODUSTANI);
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Posalji dialog
dialog_DEALERZONE
One And Only
Old Member
Since AVGUST 2013. :)
GAME OVER - SCRIPTING
SINCE 2009 - 2025

Sef

*

Citat: LANMY.pwN poslato Avgust 12, 2018, 12:06:38 POSLE PODNE
Posalji dialog
dialog_DEALERZONE

else if(dialogid == dialog_DEALERZONE && response)
	{
		for(new id = 0; id < MAX_DILER; id++)
		{
  			new fileactorabolan[50],
  			oFile[50];
			format(oFile, sizeof(oFile), FILE_GZONE, strval(inputtext));
			if(!fexist(oFile))) return SPD(playerid, dialog_DEALERZONE, DSI, ""server_boja"Server - Diler:", "{FF0000}Ta teritorija ne postoji.\n{FFFFFF}Upišite ID teritorije za dilera:", D_ODABERI, D_ODUSTANI);
			format(fileactorabolan, sizeof(fileactorabolan), DILER_FILE, id);
			if(!fexist(fileactorabolan))
			{
			    DilerInfo[id][DilerZone] = strval(inputtext);
       			SacuvajDilera(id);
				DilerSkin[id] = CreateActor(DilerInfo[id][DilerSkinID], DilerInfo[id][DilerPos_X], DilerInfo[id][DilerPos_Y], DilerInfo[id][DilerPos_Z], DilerInfo[id][DilerRotation]);
   				SetActorInvulnerable(id, true);
	    		if(DilerInfo[id][DilerAnimID] == 0) { ClearActorAnimations(id); }
      			else if(DilerInfo[id][DilerAnimID] == 1) { ApplyActorAnimation(id, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); }
        		else if(DilerInfo[id][DilerAnimID] == 2) { ApplyActorAnimation(id, "RAPPING", "RAP_A_Loop", 4.0, 1, 0, 0, 0, 0); }
				new str[90];
				format(str, sizeof(str), "{008080}[ {FFFFFF}Diler - (%d) {008080}]\nDa kupite ili prodate dileru: {FFFFFF}/diler", id);
				Diler3DText[id] = Create3DTextLabel(str, -1, DilerInfo[id][DilerPos_X], DilerInfo[id][DilerPos_Y], DilerInfo[id][DilerPos_Z], 10, 0, 1);
			    SendInfoMessage(playerid, "ZavrÅ¡ili ste kreiranje dilera.");
			    break;
			}
		}
	}
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

else if(dialogid == dialog_DEALERZONE && response)
	{
		for(new id = 0; id < MAX_DILER; id++)
		{
  			new fileactorabolan[50],
  			if(org_info[ id ][ oID ] == 0) return SPD(playerid, dialog_DEALERZONE, DSI, ""server_boja"Server - Diler:", "{FF0000}Ta teritorija ne postoji.\n{FFFFFF}UpiÅ¡ite ID teritorije za dilera:", D_ODABERI, D_ODUSTANI);
			format(fileactorabolan, sizeof(fileactorabolan), DILER_FILE, id);
			if(!fexist(fileactorabolan))
			{
			    DilerInfo[id][DilerZone] = strval(inputtext);
       			SacuvajDilera(id);
				DilerSkin[id] = CreateActor(DilerInfo[id][DilerSkinID], DilerInfo[id][DilerPos_X], DilerInfo[id][DilerPos_Y], DilerInfo[id][DilerPos_Z], DilerInfo[id][DilerRotation]);
   				SetActorInvulnerable(id, true);
	    		if(DilerInfo[id][DilerAnimID] == 0) { ClearActorAnimations(id); }
      			else if(DilerInfo[id][DilerAnimID] == 1) { ApplyActorAnimation(id, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); }
        		else if(DilerInfo[id][DilerAnimID] == 2) { ApplyActorAnimation(id, "RAPPING", "RAP_A_Loop", 4.0, 1, 0, 0, 0, 0); }
				new str[90];
				format(str, sizeof(str), "{008080}[ {FFFFFF}Diler - (%d) {008080}]\nDa kupite ili prodate dileru: {FFFFFF}/diler", id);
				Diler3DText[id] = Create3DTextLabel(str, -1, DilerInfo[id][DilerPos_X], DilerInfo[id][DilerPos_Y], DilerInfo[id][DilerPos_Z], 10, 0, 1);
			    SendInfoMessage(playerid, "ZavrÅ¡ili ste kreiranje dilera.");
			    break;
			}
		}
	}
 


Pokusaj ovako
One And Only
Old Member
Since AVGUST 2013. :)
GAME OVER - SCRIPTING
SINCE 2009 - 2025

Sef

*

Citat: LANMY.pwN poslato Avgust 12, 2018, 12:30:49 POSLE PODNE
else if(dialogid == dialog_DEALERZONE && response)
	{
		for(new id = 0; id < MAX_DILER; id++)
		{
  			new fileactorabolan[50],
  			if(org_info[ id ][ oID ] == 0) return SPD(playerid, dialog_DEALERZONE, DSI, ""server_boja"Server - Diler:", "{FF0000}Ta teritorija ne postoji.\n{FFFFFF}UpiÅ¡ite ID teritorije za dilera:", D_ODABERI, D_ODUSTANI);
			format(fileactorabolan, sizeof(fileactorabolan), DILER_FILE, id);
			if(!fexist(fileactorabolan))
			{
			    DilerInfo[id][DilerZone] = strval(inputtext);
       			SacuvajDilera(id);
				DilerSkin[id] = CreateActor(DilerInfo[id][DilerSkinID], DilerInfo[id][DilerPos_X], DilerInfo[id][DilerPos_Y], DilerInfo[id][DilerPos_Z], DilerInfo[id][DilerRotation]);
   				SetActorInvulnerable(id, true);
	    		if(DilerInfo[id][DilerAnimID] == 0) { ClearActorAnimations(id); }
      			else if(DilerInfo[id][DilerAnimID] == 1) { ApplyActorAnimation(id, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); }
        		else if(DilerInfo[id][DilerAnimID] == 2) { ApplyActorAnimation(id, "RAPPING", "RAP_A_Loop", 4.0, 1, 0, 0, 0, 0); }
				new str[90];
				format(str, sizeof(str), "{008080}[ {FFFFFF}Diler - (%d) {008080}]\nDa kupite ili prodate dileru: {FFFFFF}/diler", id);
				Diler3DText[id] = Create3DTextLabel(str, -1, DilerInfo[id][DilerPos_X], DilerInfo[id][DilerPos_Y], DilerInfo[id][DilerPos_Z], 10, 0, 1);
			    SendInfoMessage(playerid, "ZavrÅ¡ili ste kreiranje dilera.");
			    break;
			}
		}
	}
 


Pokusaj ovako
Nece..Imas li fb ili tako nesto da se cujemo lakse cemo ?
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”

Ne znam do cega je onda problem ...
One And Only
Old Member
Since AVGUST 2013. :)
GAME OVER - SCRIPTING
SINCE 2009 - 2025

Sef

*

fixano
Life Quotes:
"Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better."

“To learn something new, you need to try new things and not be afraid to be wrong.”