Pomoc oko skripte!


Započeo ʙᴜsᴛᴇʀ ᴄᴏɴɴᴇʟʟʏ, Februar 09, 2020, 14:56:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Kada kucam IG /droga oberi & /droga vremedobranja , bukv nista ne izlazi, a u skripti je sve lepo script??
Dio skripte:
CMD:droga( playerid, params[] ) {

    if( GetFactionType( playerid ) == ORG_TIP_PD ) {
		GRESKA( playerid, "PD/CIA nema razloga koristiti ovo!");
		return 1;
	}

	new item[32], igrac, slot, slot2, opcija[20], kolicina;
	if( sscanf( params, "s[32] ", item)) {
		SCM( playerid,SERVERBOJA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
		KORISCENJE( playerid, "/droga [opcija]");
     	SCM( playerid, WHITE, "[Opcije] test, give, view, napravi, posadi, oberi, osusi, buyseeds, buyilegal" );
     	SCM( playerid, WHITE, "[Opcije] use, show, vremedobranja, mix, sastojci" );
        SCM( playerid,SERVERBOJA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
		return 1;
	}
else if( strcmp( item, "vremedobranja",true) == 0)
	{
	    new plantid;
	    for( new i = 1; i < MAX_PLANTS; i++)
		{
	        if( IsPlayerInRangeOfPoint( playerid, 2.0, DrogaStab[ i ][Plantx], DrogaStab[ i ][Planty], DrogaStab[ i ][Plantz] ) )
			{
	            plantid = i;
	            break;
	        }
	        else continue;
	    }
	    if( strcmp( ImeIgraca( playerid ), DrogaStab[ plantid ][ wOwner ], true) == 0 ) {
		    if( DrogaStab[ plantid ][ wType ] == 1 ) {
				if( DrogaStab[ plantid ][ wHoursPassed ] >= 0 && DrogaStab[ plantid ][ wHoursPassed ] < 2 ) {
				    SCM( playerid,SERVERBOJA, " Prerano je jos za branje marihuane. " );
				}
				if( DrogaStab[ plantid ][ wHoursPassed ] >= 2 && DrogaStab[ plantid ][ wHoursPassed ] < 4 ) {
				    SCM( playerid,SERVERBOJA, " Ako uberes marihuanu sad dobijas 2 grama. " );
				}
				if( DrogaStab[ plantid ][ wHoursPassed ] >= 4 && DrogaStab[ plantid ][ wHoursPassed ] < 6 ) {
			        SCM( playerid,SERVERBOJA, " Ako uberes marihuanu sad dobijas 3 grama. " );
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] >= 6 && DrogaStab[ plantid ][ wHoursPassed ] <= 8 ) {
			        SCM( playerid,SERVERBOJA, " Ako uberes marihuanu sad dobijas 4 grama. " );
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] > 8 && DrogaStab[ plantid ][ wHoursPassed ] <= 9 ) {
			        SCM( playerid,SERVERBOJA, " Ako uberes marihuanu sad dobijas 1 gram. " );
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] > 9 ) {
			        SCM( playerid,SERVERBOJA, " Prekasno je jos za branje marihuane. " );
			    }
			}
			else if( DrogaStab[ plantid ][ wType ] == 2 ) {

			    if( DrogaStab[ plantid ][ wHoursPassed ] <= 2 ) {
				    SCM( playerid,SERVERBOJA, " Prerano je jos za branje kokaina. " );
				}
				else if( DrogaStab[ plantid ][ wHoursPassed ] > 11 ) {
			        SCM( playerid,SERVERBOJA, " Prekasno je jos za branje kokaina. " );
			    }
			    else if( DrogaStab[ plantid ][ wHoursPassed ] >= 3 && DrogaStab[ plantid ][ wHoursPassed ] <= 10 ) {
			        new jebomajku = DrogaStab[ plantid ][ wHoursPassed ]*5;
			        SendClientMessageEx( playerid,SERVERBOJA, " Ako uberes kokain sad dobijas %d grama.", jebomajku );
			    }
			}
		} else GRESKA( playerid, "Ovo nije tvoja stabiljka droge. " );
		return 1;
	}
	else if( strcmp( item, "oberi",true) == 0) {
	    new plantid;
	    for( new i = 1; i < MAX_PLANTS; i++) {
	        if( IsPlayerInRangeOfPoint( playerid, 2.0, DrogaStab[ i ][Plantx], DrogaStab[ i ][Planty], DrogaStab[ i ][Plantz] ) ) {
	            plantid = i;
	            break;
	        }
	        else
	            continue;
	    }
	    if( strcmp( ImeIgraca( playerid ), DrogaStab[ plantid ][ wOwner ], true) == 0 )
		{
		    if( DrogaStab[ plantid ][ wType ] == 1 ) {
				if( DrogaStab[ plantid ][ wHoursPassed ] >= 0 && DrogaStab[ plantid ][ wHoursPassed ] < 2 )
				{
				    SCM( playerid,SERVERBOJA, " Prerano si ubrao marihuanu i nisi dobio ni jedan gram. " );
				}
				if( DrogaStab[ plantid ][ wHoursPassed ] >= 2 && DrogaStab[ plantid ][ wHoursPassed ] < 4 )
				{
				    SCM( playerid,SERVERBOJA, " Ubrao si marihuanu i uzeo 2 grama. " );
				    PlayerInfo[ playerid ][ xMarihuana ] += 2;
				}
				if( DrogaStab[ plantid ][ wHoursPassed ] >= 4 && DrogaStab[ plantid ][ wHoursPassed ] < 6 )
				{
			        SCM( playerid,SERVERBOJA, " Ubrao si marihuanu i uzeo 3 grama. " );
			        PlayerInfo[ playerid ][ xMarihuana ] += 3;
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] >= 6 && DrogaStab[ plantid ][ wHoursPassed ] <= 8 )
			    {
			        SCM( playerid,SERVERBOJA, " Ubrao si marihuanu i uzeo 4 grama. " );
			        PlayerInfo[ playerid ][ xMarihuana ] += 4;
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] > 8 && DrogaStab[ plantid ][ wHoursPassed ] <= 9 )
			    {
			        SCM( playerid,SERVERBOJA, " Ubrao si marihuanu i uzeo 1 gram. " );
			        PlayerInfo[ playerid ][ xMarihuana ] += 1;
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] > 9 )
			    {
			        SCM( playerid,SERVERBOJA, " Kasno si ubrao marihuanu, te nisi dobio ni jedan gram. " );
			    }

			    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 ] );
	            ApplyAnimation( playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0,1);
	     		format( globalstring, sizeof( globalstring ), "%s ubire marihuanu.", ImeIgraca( playerid ) );
				PorukaRadius(10.0, playerid, globalstring, SIVA );
				IgracPosadio[ playerid ]--;
			}
			else if( DrogaStab[ plantid ][ wType ] == 2 ) {

			    if( DrogaStab[ plantid ][ wHoursPassed ] <= 2 )
				{
				    SCM( playerid,SERVERBOJA, " Prerano si ubrao kokain i nisi dobio ni jedan gram. " );
				}
				if( DrogaStab[ plantid ][ wHoursPassed ] > 11 )
			    {
			        SCM( playerid,SERVERBOJA, " Kasno si ubrao kokain, te nisi dobio ni jedan gram. " );
			    }
			    if( DrogaStab[ plantid ][ wHoursPassed ] >= 3 && DrogaStab[ plantid ][ wHoursPassed ] <= 10 )
			    {
			        kolicina = DrogaStab[ plantid ][ wHoursPassed ]*5;
			        SendClientMessageEx( playerid,SERVERBOJA, " Ubrao si neosuseni kokain i uzeo %d grama. ", kolicina );
			        PlayerInfo[ playerid ][ xKokain2 ] += kolicina;
			    }

			    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 ] );
	            ApplyAnimation( playerid, "BOMBER","BOM_Plant_Loop",4.0,0,0,0,0,0,1);
	     		format( globalstring, sizeof( globalstring ), "%s ubire stabiljku kokaina.", ImeIgraca( playerid ) );
				PorukaRadius(10.0, playerid, globalstring, SIVA );
				IgracPosadio[ playerid ]--;
			}
		}
		else GRESKA( playerid, "Ovo nije tvoja stabiljka droge. " );
	    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: Februar 09, 2020, 14:57:18 POSLE PODNE od Buster
Founder of
Digression Community