Problem(error/warning): Bande, GSF Ballas ... sade marihuanu u svojim enterijerima. Kada ukcam /droga posadi , droga se lepo vidi i posadi u enterijeru bande . Kada prodje vreme kada se moze brati pise da niste u blizini gde sam posadio drogu
Dio skripte:[pawn]}
if( strcmp( item, "posadi",true) == 0 ) {
if( sscanf( params, "s[32]s[20] ", item, opcija)) {
SCM( playerid, SVIJETLOPLAVA, "___________________________________________________________________");
SendUsageMessage( playerid, "/droga posadi [droga]");
SCM( playerid, BIJELA, "Droge: Marihuana, Kokain");
SCM( playerid, SVIJETLOPLAVA, "___________________________________________________________________");
return 1;
}
if(strcmp(opcija,"marihuana",true) == 0) {
new id = PlayerInfo[ playerid ][ xClan ];
if( PlayerInfo[ playerid ][ xClan ] == 0 ) return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu" );
if( OI[ PlayerInfo[ playerid ][ xClan ] ][ oControlType ] != CTIP_MARIHUANA ) return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu" );
if( !IsPlayerInRangeOfPoint( playerid, 200.0, OI[ id ][ oDrugField ][ 0 ], OI[ id ][ oDrugField ][ 1 ], OI[ id ][ oDrugField ][ 2 ] ) && inProperty[ playerid ] == -1 && inOrgInt[ playerid ] == -1 ) return GRESKA( playerid, "Morate biti na organizacijskoj poljani za sadjenje droge, ili u intu orge/kuce." );
new Float:x, Float:y, Float:z;
if( IgracPosadio[ playerid ] == 7 ) return GRESKA( playerid, "Vec si posadio 7 stabiljki marihuane/kokaina.");
if( Seeds[ playerid ] < 1 ) return GRESKA( playerid, "Da biste zapoceli proizvodnju marihuane,potrebno vam je 1 sjemenka marihuane!");
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT) {
new plants = -1;
for( new ix = 1; ix < MAX_PLANTS; ix++ ) {
if( DrogaStab[ ix ][ wPlanted ] == 0 ) {
plants = ix;
break;
}
}
if( plants == -1 ) return GRESKA( playerid, "Trenutno ne mozete da sadite drogu." );
GetPlayerPos( playerid, x, y, z );
DrogaStab[ plants ][ Plantx ] = x;
DrogaStab[ plants ][ Planty ] = y;
DrogaStab[ plants ][ Plantz ] = z-2;
DrogaStab[ plants ][ wObjectID ] = CreateDynamicObject( 19473, x, y, z-2, 0.0, 0.0, 96, GetPlayerVirtualWorld( playerid ), -1, -1, 200.0 );
DrogaStab[ plants ][ wPlanted ] = 1;
DrogaStab[ plants ][ wType ] = 1;
DrogaStab[ plants ][ wHoursPassed ] = 0;
strmid( DrogaStab[ plants ][ wOwner ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 255);
DrogaStab[ plants ][ wViwo ] = GetPlayerVirtualWorld( playerid );
PlayerPlaySound( playerid, 2000, 0, 0, 0 );
Seeds[ playerid ] -= 1;
ApplyAnimation( playerid, "BOMBER", "BOM_Plant_Loop",4.0,0,0,0,0,0,1 );
format( globalstring, sizeof( globalstring ), "%s uzima sjemenke za marihuanu, i sadi ih.", ImeIgraca( playerid ) );
PorukaRadius( 10.0, playerid, globalstring, LJUBICASTA );
SendInfoMessage( playerid, "Da proveris da li je marihuana spremna za branje kucaj '/droga vrijemedobranja'." );
IgracPosadio[ playerid ]++;
} else GRESKA( playerid, "Ne mozes posaditi drogu dok si u vozilu!Posadi ju na travi ili ces biti kaznjen!");
return 1;
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Slika/video ingame problema(obavezno ako je ingame problem):
To se desaje na ATH/SM modovima,ne vidim poentu sadjenja u int org?
Imas poljanu koja je namjenjena na to...
Pa napravi proveru ako posadi u interijeru, da izbaci gresku?
Napravio sam , lock.