GangZoneCreate - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GangZoneCreate (
/showthread.php?tid=409012)
GangZoneCreate -
Mr_Zlodei - 20.01.2013
hello! I have a problem, do not create gang zone.
where error can not understand ...
sorry for my bad English
.
PHP код:
#define GANG_ZONE 380
PHP код:
create_gang_zone ( )
{
new
id, idx_max_min [ 19 ] = { 20, 40, ... } ;
for ( new i, Float: MAX_Y = 2965.00, Float: MAX_X = 2870.00 ; i != GANG_ZONE ; i++ )
{
zone_params [ i ][ L_atak_zone ] = -1, zone_params [ i ] [ L_my_zone ] = -1 ;
if ( i == idx_max_min [ i ] ) MAX_X -= 300.00, MAX_Y = 2965.00, ++ id ;
zone_params [ i ] [ z_min_x ] = MAX_Y - 300.00;
zone_params [ i ] [ z_min_y ] = MAX_X - 300.00;
zone_params [ i ] [ z_max_x ] = MAX_Y;
zone_params [ i ] [ z_max_y ] = MAX_X, MAX_Y -= 300.00 ;
zone_params [ i ] [ L_id_zone ] = GangZoneCreate ( zone_params [ i ] [ z_min_x ], zone_params [ i ] [ z_min_y ],
zone_params [ i ] [ z_max_x ] , zone_params [ i ] [ z_max_y ] ) ;
}
print ("gang Zone Load") ; //I do not see this in the server console
return 1 ;
}
public OnPlayerSpawn ( playerid )
PHP код:
for ( new i ; i != GANG_ZONE ; ++ i )
GangZoneShowForPlayer ( playerid, zone_params [ i ] [ L_id_zone ], 0xA7A7A055 ) ;
Re: GangZoneCreate -
[KHK]Khalid - 20.01.2013
You have to use the function
create_gang_zone. For example:
pawn Код:
public OnGameModeInit()
{
create_gang_zone();
return 1;
}
Re: GangZoneCreate -
Mr_Zlodei - 20.01.2013
Yes, I use it.
Re: GangZoneCreate -
Threshold - 20.01.2013
pawn Код:
create_gang_zone ( )
{
new
id, idx_max_min [ 19 ] = { 20, 40, ... } ;
for ( new i; i != GANG_ZONE ; i++ )
{
new Float: MAX_Y = 2965.00, Float: MAX_X = 2870.00
zone_params [ i ][ L_atak_zone ] = -1, zone_params [ i ] [ L_my_zone ] = -1 ;
if ( i == idx_max_min [ i ] ) MAX_X -= 300.00, MAX_Y = 2965.00, ++ id ;
zone_params [ i ] [ z_min_x ] = MAX_Y - 300.00;
zone_params [ i ] [ z_min_y ] = MAX_X - 300.00;
zone_params [ i ] [ z_max_x ] = MAX_Y;
zone_params [ i ] [ z_max_y ] = MAX_X, MAX_Y -= 300.00 ;
zone_params [ i ] [ L_id_zone ] = GangZoneCreate ( zone_params [ i ] [ z_min_x ], zone_params [ i ] [ z_min_y ],
zone_params [ i ] [ z_max_x ] , zone_params [ i ] [ z_max_y ] ) ;
}
print ("gang Zone Load") ; //I do not see this in the server console
return 1 ;
}
?? Does this work?
Re: GangZoneCreate -
Mr_Zlodei - 20.01.2013
I realized the problem, the problem is my lack of attention
dealing in this line
PHP код:
if (i == idx_max_min [i])
I mistakenly put
instead
PHP код:
idx_max_min [id]
Thank you all.
sorry my bad english