Problem oko drug sys


Započeo LuGiCH, Februar 27, 2019, 19:47:50 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Kada igrac izadje nestane seme koje je taj igrac kupio i kada igrac posadi seme kada izadje se izbrise to seme sto je on pokazao. Ako moze neko resenje?
Dio skripte: [ pawn ]//[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //

Verovatno ti se briše pod OnPlayerDisconnect call-u, pošalji ceo...

Pošalji CMD ?
â˜... School Project / Owner / Scripter â˜...

Evo OnPlayerDisconect
public OnPlayerDisconnect( playerid, reason ) {

	//DestroyPlayerVehicles( playerid );

    new lastid = playerid;
    if( IsValidDynamicMapIcon( PlayerGpsRadar[ playerid ][ _pgrIconId ] ) ) {
		DestroyDynamicMapIcon( PlayerGpsRadar[ playerid ][ _pgrIconId ] );
	}
	
    if( IsValidDynamicObject( PlayerGpsRadar[ playerid ][ _pgrObject ] ) ) {
		DestroyDynamicObject( PlayerGpsRadar[ playerid ][ _pgrObject ] );
	}

	if( IsValidDynamicCP( PlayerGpsRadar[ playerid ][ _pgrCheckPointId ] ) ) {
		DestroyDynamicCP( PlayerGpsRadar[ playerid ][ _pgrCheckPointId ] );
	}

    if( IsPlayerInAnyVehicle( playerid ) ) {
        new Float:x,Float:y,Float:z,vehicleid = GetPlayerVehicleID(playerid);
		GetVehiclePos( vehicleid,x, y, z );
		RealVehiclePositions[ vehicleid ][ 0 ] = x;
		RealVehiclePositions[ vehicleid ][ 1 ] = y;
		RealVehiclePositions[ vehicleid ][ 2 ] = z;
	}

    antiCheatCS[ playerid ][ CPSCount ] = 0;
	antiCheatCS[ playerid ][ CPSTick ] = 0;
	antiCheatCS[ playerid ][ CWTime ] = 0;
    antiCheatCS[ playerid ][ CWVehID ] = -1;

    if( IsValidPlayerObject( playerid, farmerInfo[ playerid ][ fiBucketObject ] ) )
		DestroyPlayerObject( playerid, farmerInfo[ playerid ][ fiBucketObject ] );

    if( farmerInfo[ playerid ][ fiVehicleBucket ] != -1 ) {
		new farmvehicle = farmerInfo[ playerid ][ fiVehicleBucket ];

		farmerVehicles[ farmvehicle ][ fvMilk ] = false;
    	farmerVehicles[ farmvehicle ][ fvMilkpID ] = -1;
	}

    if( SearchNadji[ playerid ] != -1 ) {
		SearchNadji[ playerid ] = -1;
	    Dimi_DisablePlayerCheckpoint( playerid);
	}

    if( ListaPrikazana[ playerid ] ) {
		KladionicaTDControl( playerid, false );
	}
    if( MojListicPrikazan[ playerid ] ) {
		KladionicaListicTDControl( playerid, false );
	}
	if( RezultatiPrikazana[ playerid ] ) {
		RezultatiTDControl( playerid, false );
	}

    if( PlayerInBlowJob[ playerid ] != 0 ) {

		switch( PlayerInBlowJob[ playerid ] ) {

	        case 1: {
	        
				DestroyActor( Sex_Lisa );
				WhoreLisa = false;
			}
	        case 2: {
	        
				DestroyActor( Sex_Angelina );
				WhoreAngelina = false;
			}
	        case 3: {
	        
				DestroyActor( Sex_Mia );
				WhoreMia = false;
			}
	        case 4: {
	        
				DestroyActor( Sex_Sendy );
				WhoreSendy = false;
			}
		}

		StopAudioStreamForPlayer( playerid );
	    SetCameraBehindPlayer( playerid );
        PlayerInBlowJob[ playerid ] = 0;
    	SexTDControl( playerid, false );
    	BlowJobCount[ playerid ] = 0;
	    TogPlayerHud( playerid );
	    TogglePlayerControllable( playerid, ( true ) );
		ClearAnimations( playerid );
    	Dimi_KillTimer( PusenjeTimer[ playerid ] );
	}

    switch( reason ) {
		case 0: {
			format( globalstring, sizeof( globalstring ), "** (( %s je napustio server ( crash ) ))", ImeIgraca( playerid ) );
			PorukaRadius( 60.0 , playerid, globalstring, 0xBFC0C2FF );
		}
		case 1: {
			format( globalstring, sizeof( globalstring ), "** (( %s je napustio server ( disconnect ) ))", ImeIgraca( playerid ) );
			PorukaRadius( 60.0 , playerid, globalstring, 0xBFC0C2FF );
		}
	}

    if( GetPVarInt( playerid, "Computer" ) == 1 ) {
        Police_TVTDControl( playerid, false );
        SetPVarInt( playerid, "Computer", 0 );
    }

    DestroyPlayerTextDraws( playerid );

    if( IgracSeRegistruje[ playerid ] == true ) RegisterTDControl( playerid, false );

	if( AdminVozilo[ playerid ] != -1 ) Dimi_DestroyVehicle( AdminVozilo[ playerid ] ), AdminVozilo[ playerid ] = -1;

	if( TrkaVozilo[ playerid ] != -1 ) Dimi_DestroyVehicle( TrkaVozilo[ playerid ] ), TrkaVozilo[ playerid ] = -1;

	if( HitmanInfo[ playerid ][ GotHit ] > 0) {
	    if( HitmanInfo[ playerid ][ GetChased ] < 999 ) {
	        if( IsPlayerConnected( HitmanInfo[ playerid ][ GetChased ] ) ){
	        	SCM( HitmanInfo[ playerid ][ GetChased ], ZUTA, "Vasa meta je izasla sa servera." );
	            HitmanInfo[ HitmanInfo[ playerid ][ GetChased ] ][ GoChase ] = 999;
			}
	    }
	}
	
	if( garbagemanInfo[ playerid ][ gmiJob ] == true ) {

		new vehicleid = garbagemanInfo[ playerid ][ gmiVehicleID ];

	    garbagemanVehicles[ vehicleid ][ gGarbages ] = 0;
     	garbagemanVehicles[ vehicleid ][ gPlayerID ] = -1;

     	SetVehicleToRespawn( vehicleid );
	}
	
	if( PlayerCement[ playerid ] != -1 ) VehCement[ PlayerCement[ playerid ] ] = false;

	if( PljackaVreme[ playerid ] > 0 ) Dimi_KillTimer( PljackanjeBankeTimer[ playerid ] ), PljackaUToku = false;
	
	PljackaNovac[ playerid ] = 0;
	VremeZaNovac[ playerid ] = 0;
	PljackaVreme[ playerid ] = 0;
	
	if( ZlatoVreme[ playerid ] > 0 ) Dimi_KillTimer( PljackanjeZlatareTimer[ playerid ] ), ZlataraUToku = false;
	
	PljackaZlato[ playerid ] = 0;
	VremeZaZlato[ playerid ] = 0;
	ZlatoVreme[ playerid ] = 0;
	
	if( DragedPlayerID[ playerid ] != -1 ) {

		format( globalstring, sizeof( globalstring ), "%s je napustio server, pusteni ste.", ImeIgraca( playerid ) );
		SCM( DragedPlayerID[ playerid ], -1, globalstring );
		TogglePlayerControllable( DragedPlayerID[ playerid ], 1 );
		Draged[ DragedPlayerID[ playerid ] ] = -1;
	}
	
    if( farmerInfo[ playerid ][ fiFarmerPlantsPlanted ] != -1 ) {
    
        for( new plantid = 0; plantid < MAX_FARMS; plantid++ ) {
        
            if( plantInfo[ plantid ][ farmPlantCreated ] && plantInfo[ plantid ][ farmPlayerID ] == lastid ) {
            
                if( IsValidDynamic3DTextLabel( plantInfo[ plantid ][ farm3D ] ) )
					DestroyDynamic3DTextLabel( plantInfo[ plantid ][ farm3D ] );

				if( IsValidDynamicObject( plantInfo[ plantid ][ farmObject ] ) )
					DestroyDynamicObject( plantInfo[ plantid ][ farmObject ] );

				ResetFarmPlant( plantid );
            }
        }
    }

    PlayerTextDrawDestroy( playerid, PlayerGpsRadarText[ playerid ] );

    if( PitanjeBroj[ playerid ] != 0 ) Dimi_KillTimer( TimerPitanje[ playerid ] );
    
    Dimi_KillTimer( atmrobTimer[ playerid ] );
    
    if( PocetniTutorialStartovan[ playerid ] == true ) Dimi_KillTimer( TimerTutorial[ playerid ] );
    
    Dimi_KillTimer( FarbanjeTimer[ playerid ] );
    
    if( PlayerInfo[ playerid ][ xUbijen ] == 1 ) Dimi_KillTimer( BolnicaTimer[ playerid ] );

	if( IgracPosadio[ playerid ] != 0 ) {
	    for( new plantid = 1; plantid < MAX_PLANTS; plantid++ ) {
	        if( strcmp( ImeIgraca( playerid ), DrogaStab[ plantid ][ wOwner ], true ) == 0 ) {
	            if( DrogaStab[ plantid ][ wPlanted ] == 1 ) {
					DrogaStab[ plantid ][ Plantx ] = 0;
					DrogaStab[ plantid ][ Planty ] = 0;
				   	DrogaStab[ plantid ][ Plantz ] = 0;
				   	DrogaStab[ plantid ][ wType ] = 0;
					DrogaStab[ plantid ][ wPlanted ] = 0;
					DrogaStab[ plantid ][ wHoursPassed ] = 0;
					strmid( DrogaStab[ plantid ][ wOwner ], "Niko", 0, strlen( "Niko" ), 255);
					DrogaStab[ plantid ][wViwo] = GetPlayerVirtualWorld( playerid );
				    DestroyDynamicObject( DrogaStab[ plantid ][ wObjectID ] );
				}
            }
		}
	}

	if( PlayerInfo[ playerid ][ xPosao ] == POSAO_MEHANICAR ) {
	    if(GetPVarInt( playerid, "JobDuty") == 1) { Mechanics -= 1; }
	}

    if( PlayerBuyingAS[ playerid ] != -1 ) {
 	    AutoSalon[ PlayerBuyingAS[ playerid ] ][ AlreadyBuying ] = false;
 	    PlayerBuyingAS[ playerid ] = -1;
	}

	antiCheatCS[ playerid ][ ArmedWeapon ] = 0;

    if( WARPInfo[ playerid ][ WARTim ][ 0 ] == true ) {
        format( globalstring, sizeof( globalstring ), ""col_orange"WAR | {F81414}%s: "col_white"je napustio WAR.", ImeIgraca( playerid ) );
        WARPoruka( WARPInfo[ playerid ][ WARIgrac ], 0xFF9900AA, globalstring );
		WARInfo[ WARPInfo[ playerid ][ WARIgrac ] ][ WARTimClanovi ][ 0 ]--; }

	if( WARPInfo[ playerid ][ WARTim ][ 1 ] == true ) {
        format( globalstring, sizeof( globalstring ), ""col_orange"WAR | {0049FF}%s: "col_white"je napustio WAR.", ImeIgraca( playerid ) );
        WARPoruka( WARPInfo[ playerid ][ WARIgrac ], 0xFF9900AA, globalstring );
		WARInfo[ WARPInfo[ playerid ][ WARIgrac ] ][ WARTimClanovi ][ 1 ]--; }

	if( Rentano[ playerid ] != -1 ) {
	    Dimi_KillTimer( RentTimer[ playerid ] );
	    VehicleObjectCheck( Rentano[ playerid ] );
    	SetVehicleToRespawn( Rentano[ playerid ] );
    	LinkVehicleToInterior( Rentano[ playerid ], 0 );
		Rentano[ playerid ] = -1;
	}

    if( PlayerCuffed[ playerid ] >= 1 ) {
		if( PlayerInfo[ playerid ][ xZatvor ] == 0 ) {
			PlayerInfo[ playerid ][ xZatvor ] = OBICAN_ZATVOR;
			PlayerInfo[ playerid ][ xZatvorVreme ] = 60;
			strmid( PlayerInfo[ playerid ][ xOffPJail ], "LTA", 0, strlen("LTA"), 64 );
		}
	}

	if( PlayerInfo[ playerid ][ xWanted ] > 0 ) {
		if( PlayerInfo[ playerid ][ xZatvor ] == 0 ) {
		    foreach( Player, i ) {
				if( IsPlayerConnected( i ) ) {
					if( GetFactionType( i ) == ORG_TIP_PD && CrimInRange( 40.0, playerid, i ) ) {
		
					    PlayerInfo[ playerid ][ xLeaveJail ] = true;
						PlayerInfo[ playerid ][ xZatvor ] = OBICAN_ZATVOR;
						PlayerInfo[ playerid ][ xZatvorVreme ] = 6*PlayerInfo[ playerid ][ xWanted ];
						new price = PlayerInfo[ playerid ][ xWanted ]*500;
						PlayerInfo[ playerid ][ xNovac ] -= price;
						PlayerInfo[ playerid ][ xWanted ] = 0;
					}
				}
			}
		}
	}

	if( GetFactionType( playerid ) == ORG_TIP_MD ) {
	    if( MedicDuty[ playerid ] == true ) { Medics -= 1; }
	}

	if( GetPVarInt(playerid, "BreakingLock") == 1 )
	{
	    Dimi_KillTimer( GetPVarInt( playerid, "BreakLockTimer" ) );
	}

	if( GetPVarInt( playerid, "ImmobTimerCalled") == 1 )
	{
	    Dimi_KillTimer( GetPVarInt( playerid, "immobcounttimer" ) );
	}

	if( GetPVarInt( playerid, "BreakLockTimerCalled" ) == 1 )
	{
		Dimi_KillTimer( GetPVarInt( playerid, "breakcounttimer" ) );
	}


	if( BoomboxInfo[ playerid ][ boomboxPlaced ] ) {
        Boombox_Destroy( playerid );
    }

    if( antiCheatCS[ playerid ][ TakeVehicle ] != INVALID_VEHICLE_ID ) {
    	BusyVehicle[ antiCheatCS[ playerid ][ TakeVehicle ] ] = -1;
    }

	if( PlayerInfo[ playerid ][ xAdmin ] != 0 ) SacuvajAdmina( playerid );

	if( PlayerLogged[ playerid ] == true ) {
		SavePlayer( playerid );
	}

    if( Uciskolu[ playerid ] == true ) { Dimi_KillTimer( SkolaTimer[ playerid ] ); }

    if( CistacPosao[ playerid ] == true )  { Dimi_KillTimer( CistacTimer[ playerid ] ); }

    if( TrashSearch[ playerid ] == 1 )  { Dimi_KillTimer( TrashTimer[ playerid ] ); }

    if( GetPVarInt( playerid, "RequestingBackup" ) == 1 ) {
		Dimi_KillTimer( backuptimer[ playerid ] );
		BackupClear( playerid, 0 );
	}

    if( KupujeNamestaj[ playerid ] == 1 ) {
 	    nekokupujenamestaj = 0;
 	    KupujeNamestaj[ playerid ] = 0;
 	}

    if( offeredByCabbie[ playerid ] != INVALID_PLAYER_ID )
	{
		TaximetarUkljucen[ offeredByCabbie[ playerid ] ] = false;

        PlayerTextDrawSetString( offeredByCabbie[ playerid ], TaxistaTD[ offeredByCabbie[ playerid ] ][ 6 ], "N/A" );
        PlayerTextDrawShow( offeredByCabbie[ playerid ], TaxistaTD[ offeredByCabbie[ playerid ] ][ 6 ] );
		PlayerTextDrawSetString( offeredByCabbie[ playerid ], TaxistaTD[ offeredByCabbie[ playerid ] ][ 9 ], "N/A" );
		PlayerTextDrawShow( offeredByCabbie[ playerid ], TaxistaTD[ offeredByCabbie[ playerid ] ][ 9 ] );

		CenaVoznje[ offeredByCabbie[ playerid ] ] = 0;
		VoziIgracaID[ offeredByCabbie[ playerid ] ] = INVALID_PLAYER_ID;
		Dimi_KillTimer( TaxiTimer[ offeredByCabbie[ playerid ] ] );
		offeredByCabbie[ playerid ] = INVALID_PLAYER_ID;
	}

    if( GetPVarInt( playerid, "CuffTimerCalled") == 1 )
	{
	    Dimi_KillTimer( TazerTimer[ playerid ] );
	}

    if( AdminDuty[ playerid ] ) {
    	AdminDuty[ playerid ] = false;
	}

	if( KrenuoKosenje[ playerid ] )
		for( new i = 0; i < 38; i++)
			if( IsValidPlayerObject( playerid, Grass[ i ][ playerid ] ) ) DestroyPlayerObject( playerid, Grass[ i ][ playerid ] );
	return true;
}

UpdateBankTD( playerid ) {
    new stringic[ 40 ];
	if( PlayerInfo[ playerid ][ xImaBRacun ] == false ) {
	    PlayerTextDrawSetString( playerid, BankaIgraca[ playerid ], "~b~Banka: ~w~No" );
    }
    else {
        format( stringic, sizeof( stringic ), "~b~Banka: ~w~%d$", PlayerInfo[ playerid ][ xBRacun ] );
	    PlayerTextDrawSetString( playerid, BankaIgraca[ playerid ], stringic );
    }
}

UpdatePlataTD( playerid ) {
    new stringic[ 20 ];
	format( stringic, sizeof( stringic ), "~r~Plata: ~w~%d$", PlayerInfo[ playerid ][ xPlatniRacun ] );
	PlayerTextDrawSetString( playerid, PlataIgraca[ playerid ], stringic );
}

UpdateZlatoTD( playerid ) {
    new stringic[ 20 ];
	format( stringic, sizeof( stringic ), "~y~Zlato: ~w~%dg", PlayerInfo[ playerid ][ xZlato ] );
	PlayerTextDrawSetString( playerid, ZlatoIgraca[ playerid ], stringic );
}

SetPlayerTDStats( playerid ) {

    new Float:value;
	if( PlayerInfo[ playerid ][ xHunger ] > 0 ) value = PlayerInfo[ playerid ][ xHunger ];
	else if( PlayerInfo[ playerid ][ xHunger ] <= 0 ) value = 0;

    SetPlayerProgressBarValue( playerid, GladIgracaBar[ playerid ], value );
    ShowPlayerProgressBar( playerid, GladIgracaBar[ playerid ] );

    new stringic[ 40 ];

    format( stringic, sizeof( stringic ), "%d", PlayerInfo[ playerid ][ xHunger ] );
    PlayerTextDrawSetString( playerid, GladIgraca[ playerid ], stringic );


	if( PlayerInfo[ playerid ][ xImaBRacun ] == false ) {
	    PlayerTextDrawSetString( playerid, BankaIgraca[ playerid ], "~b~Banka: ~w~No" );
    }
    else {
        format( stringic, sizeof( stringic ), "~b~Banka: ~w~%d$", PlayerInfo[ playerid ][ xBRacun ] );
	    PlayerTextDrawSetString( playerid, BankaIgraca[ playerid ], stringic );
    }
    
    format( stringic, sizeof( stringic ), "~r~Plata: ~w~%d$", PlayerInfo[ playerid ][ xPlatniRacun ] );
	PlayerTextDrawSetString( playerid, PlataIgraca[ playerid ], stringic );
	
	format( stringic, sizeof( stringic ), "~y~Zlato: ~w~%dg", PlayerInfo[ playerid ][ xZlato ] );
	PlayerTextDrawSetString( playerid, ZlatoIgraca[ playerid ], stringic );

	PlayerTextDrawShow( playerid, GladIgraca[ playerid ] );
	PlayerTextDrawShow( playerid, BankaIgraca[ playerid ] );
    PlayerTextDrawShow( playerid, PlataIgraca[ playerid ] );
    PlayerTextDrawShow( playerid, ZlatoIgraca[ playerid ] );

    Dimi_SetPlayerWantedLevel( playerid, PlayerInfo[ playerid ][ xWanted ] );
}

stock DonatorBoja( playerid ) {

	if( PlayerInfo[ playerid ][ xDBO ] ) {
	
		if( PlayerInfo[ playerid ][ xDBoja ] == 1 ) {
		
			SetPlayerColor(playerid, 0xFF808000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 2 ) {
		
			SetPlayerColor(playerid, 0xFF000000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 3 ) {
		
			SetPlayerColor(playerid, 0x80FFFF00 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 4 ) {
		
			SetPlayerColor(playerid, 0xFF804000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 5 ) {
		
			SetPlayerColor(playerid, 0xFF62B000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 6 ) {
		
			SetPlayerColor(playerid, 0xC0C0C000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 7 ) {
		
			SetPlayerColor(playerid, 0x00FF0000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 8 ) {
		
			SetPlayerColor(playerid, 0xFFFF0000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 9 ) {
		
			SetPlayerColor(playerid, 0x00800000 );
		}
		if( PlayerInfo[ playerid ][ xDBoja ] == 10 ) {
		
			SetPlayerColor(playerid, 0x0000FF00 );
		}
	}
}

i evo cmd
if( strcmp( item, "posadi",true) == 0 ) {
	    if( sscanf( params, "s[32]s[20] ", item, opcija)) {
	        SCM( playerid, SVETLOPLAVA, "___________________________________________________________________");
			SendUsageMessage( playerid, "/droga posadi [droga]");
			SCM( playerid, BELA, "Droge: Marihuana, Kokain");
			SCM( playerid, SVETLOPLAVA, "___________________________________________________________________");
			return 1;
		}
		if(strcmp(opcija,"marihuana",true) == 0) {
		    new id = PlayerInfo[ playerid ][ xClan ];
		    if( PlayerInfo[ playerid ][ xClan ] == 0 ) return SendErrorMessage( playerid, "Niste u mogucnosti koristiti ovu komandu" );
		    //if( OI[ PlayerInfo[ playerid ][ xClan ] ][ oControlType ] != CTIP_MARIHUANA ) return SendErrorMessage( playerid, "Niste u mogucnosti koristiti ovu komandu" );
            if( !IsPlayerInRangeOfPoint( playerid, 200.0, OI[ id ][ oDrugField ][ 0 ], OI[ id ][ oDrugField ][ 1 ], OI[ id ][ oDrugField ][ 2 ] ) ) return SendErrorMessage( playerid, "Morate biti na organizacijskoj poljani za sadjenje droge." );
			new Float:x, Float:y, Float:z;
			if( IgracPosadio[ playerid ] == 7 ) return SendErrorMessage( playerid, "Vec si posadio 7 stabiljki marihuane/kokaina.");
			if( Seeds[ playerid ] < 1 ) return SendErrorMessage( playerid, "Da biste zapoceli proizvodnju marihuane,potrebno vam je 1 semenka 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 SendErrorMessage( 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 semenke 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 vremedobranja'." );
				IgracPosadio[ playerid ]++;
		    		
			} else SendErrorMessage( playerid, "Ne mozes posaditi drogu dok si u vozilu!Posadi ju na travi ili ces biti kaznjen!");
		    return 1;
		}
		else if(strcmp(opcija,"kokain",true) == 0) {
		    new id = PlayerInfo[ playerid ][ xClan ];
		    if( PlayerInfo[ playerid ][ xClan ] == 0 ) return SendErrorMessage( playerid, "Niste u mogucnosti koristiti ovu komandu" );
		    //if( OI[ PlayerInfo[ playerid ][ xClan ] ][ oControlType ] != CTIP_KOKAIN ) return SendErrorMessage( playerid, "Niste u mogucnosti koristiti ovu komandu" );
            if( !IsPlayerInRangeOfPoint( playerid, 200.0, OI[ id ][ oDrugField ][ 0 ], OI[ id ][ oDrugField ][ 1 ], OI[ id ][ oDrugField ][ 2 ] ) ) return SendErrorMessage( playerid, "Morate biti na organizacijskoj poljani za sadjenje droge." );
			new Float:x, Float:y, Float:z;
		    if( IgracPosadio[ playerid ] == 7 ) return SendErrorMessage( playerid, "Vec si posadio 7 stabiljki marihuane/kokaina.");
            if( SeedsK[ playerid ] < 20 ) return SendErrorMessage( playerid, "Da biste zapoceli proizvodnju kokaina,potrebno vam je 20 semenki kokaina!");
			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 SendErrorMessage( 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( 3409, x, y, z-2, 0.0, 0.0, 96, GetPlayerVirtualWorld( playerid ), -1, -1, 200.0 );
				DrogaStab[ plants ][ wPlanted ] = 1;
				DrogaStab[ plants ][ wType ] = 2;
				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 );
				SeedsK[ playerid ] -= 20;
				ApplyAnimation( playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0,1);
		        format( globalstring, sizeof( globalstring ), "%s uzima semenke za kokain, i sadi ih.", ImeIgraca( playerid ) );
				PorukaRadius( 10.0, playerid, globalstring, LJUBICASTA );
				IgracPosadio[ playerid ]++;
				SendInfoMessage( playerid, "Da proveris da li je kokain spreman za branje kucaj '/droga vremedobranja'." );

			} else SendErrorMessage( playerid, "Ne mozes posaditi drogu dok si u vozilu!Posadi ju na travi ili ces biti kaznjen!");
		    return 1;
		}
		return 1;
	}

Vidim da resetuje ovo iz enuma na 0 kada se igrac disconnectuje
Solution: Umesto id-a igraca treba staviti ime igrača jer ako ne uništiš automatski ce neki igrac koji je nasledio id tog igraca imat drogu iako je nije posadio
Edit: telefon sam, vec jeste ime igraca samo makni brisanje i vidi oce bit problema

Gde je to? Mozes biti malo tacniji? Deo skripte?

Popravio sam za sadjenje droge, ali kada neko kupi seeds i izadje izbrisu mu se seeds

if( IgracPosadio[ playerid ] != 0 ) {
	    for( new plantid = 1; plantid < MAX_PLANTS; plantid++ ) {
	        if( strcmp( ImeIgraca( playerid ), DrogaStab[ plantid ][ wOwner ], true ) == 0 ) {
	            if( DrogaStab[ plantid ][ wPlanted ] == 1 ) {
					DrogaStab[ plantid ][ Plantx ] = 0;
					DrogaStab[ plantid ][ Planty ] = 0;
				   	DrogaStab[ plantid ][ Plantz ] = 0;
				   	DrogaStab[ plantid ][ wType ] = 0;
					DrogaStab[ plantid ][ wPlanted ] = 0;
					DrogaStab[ plantid ][ wHoursPassed ] = 0;
					strmid( DrogaStab[ plantid ][ wOwner ], "Niko", 0, strlen( "Niko" ), 255);
					DrogaStab[ plantid ][wViwo] = GetPlayerVirtualWorld( playerid );
				    DestroyDynamicObject( DrogaStab[ plantid ][ wObjectID ] );
				}
            }

prema tome kodu i treba da se izbrise ne kontam ?