Komanda /unjail!


Započeo ʙᴜsᴛᴇʀ ᴄᴏɴɴᴇʟʟʏ, Februar 10, 2020, 16:28:32 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Kada nekog /unjail ovo mu se desava kao kad bi bio u jailu...
Dio skripte:
CMD:unjail( playerid, params[] ) {
    if( PlayerInfo[ playerid ][ xAdmin ] >= 4  ) {
        if( !AdminDuty[ playerid ] ) return GRESKA( playerid, "Da bi koristili ovu komandu morate biti na duznosti." );

		new id;
		if( sscanf( params, "u", id ) ) return KORISCENJE( playerid, "/unjail |  ID/Deo Imena  |" );
		if( id == IPI ) return KORISCENJE( playerid, "Pogresan ID igraca." );
		if( PlayerInfo[ id ][ xZatvor ] != ALKATRAZ ) return GRESKA( playerid, "Da bi oslobodili igraca on prvo mora biti u zatvoru." );

        new rand = random( sizeof( RandomCelije ) );
		ac_SetPlayerPos( id, RandomCelije[ rand ][ 0 ], RandomCelije[ rand ][ 1 ], RandomCelije[ rand ][ 2 ] );
		SetTimerEx( "SlobodnoSada", 2000, false, "i", id );
		SetCameraBehindPlayer( id );
		TogglePlayerControllable( id, false );
		SetPlayerInterior( id, 0 );
		SetPlayerVirtualWorld( id, 0 );

		PlayerInfo[ id ][ xZatvor ] = 0;
		PlayerInfo[ id ][ xZatvorVreme ] = 0;
		zatvorposao[ id ] = 0; radioposao[ id ] = 0;
		RemovePlayerAttachedObject(id, INDEX_GARBAGE);
		GameTextForPlayer( id, "~g~Sloboda~n~~w~Pokusajte biti bolji gradjanin", 5000, 1);

	    AI[ playerid ][ aTUnjail ]++;
	    SacuvajAdmina( playerid );

		SendClientMessageEx( id, SVETLORED, "Admin %s vas je oslobodio iz zatvora.", ImeIgraca( playerid ) );
		SendClientMessageEx( playerid, SVETLORED, "Oslobodili ste igraca %s iz zatvora.", ImeIgraca( id ) );
	    format( globalstring, sizeof( globalstring ), "- UNJAIL -  "BELA"%s je oslobodio iz zatvora igraca %s.", ImeIgraca( playerid ), ImeIgraca( id ) );
	   	AdminPoruka( SERVERBOJA, globalstring );

	   	new string[ 128 ];
	    format( string, sizeof( string ), "Admin %s je unjailovao igraca %s", ImeIgraca( playerid ), ImeIgraca( id ) );
	    LogSave( "Ostalo/LogUnJail.log", string );
    }
	else return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu." );
	return 1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): //
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/IlKE17W
Founder of
Digression Community

https://wiki.sa-mp.com/wiki/SetPlayerWorldBounds

Citat: SAMP WikiA player's world boundaries can be reset by setting them to 20000.0000, -20000.0000, 20000.0000, -20000.0000. These are the default values.
Poslednja Izmena: Februar 10, 2020, 17:03:26 POSLE PODNE od malipablo

Citat: malipablo poslato Februar 10, 2020, 17:01:50 POSLE PODNE
https://wiki.sa-mp.com/wiki/SetPlayerWorldBounds
I sta sad, ovo     SetPlayerWorldBounds(playerid, 20.0, 0.0, 20.0, 0.0); stavim na /unjail ?
Founder of
Digression Community

Ne nego vrednosti iz citata od gore

Citat: malitoni poslato Februar 10, 2020, 21:25:55 POSLE PODNE
Ne nego vrednosti iz citata od gore
Ne razumem te...
Founder of
Digression Community

SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);