Problem(error/warning): Napravio sam dinamican port sistem i kad napisem /kreirajport izbaci dialog i napisem ime port ali se ne sacuva,a kada idem /aport ne izbaci dialog.
Deo skripte://
Citat: Galardo poslato Avgust 07, 2021, 17:30:55 POSLE PODNE
Cudno, mora da je nesto u code-u problem.
[pawn]YCMD:aport(playerid,params[],help)
{
if(PI[ playerid ][ pAdmin ] >= 1 )
{
if( !AdminDuty[ playerid ] ) return SCM( playerid,-1,"Da bi koristili ovu komandu morate biti na duznosti." );
if( PI[ playerid ][ pAdmin ] < 7 ) {
// if( UzeoOpremu[ playerid ] == true ) return SCM( playerid,-1,Ne mozes koristi ovu komandu dok radis posao ili imas opremu posla." );
// if( PI[ playerid ][ pWanted ] != 0 ) return SCM( playerid,-1, "Ne mozes koristi ovu komandu dok imas wanted level." );
if( PI[ playerid ][ pZatvor ] != 0 ) return SCM( playerid,-1, "Ne mozes koristi ovu komandu dok si u jailu." );
}
new DialogStrgEx[1000];
strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
for( new i = 0; i < MAX_APORTS; i++ ) {
if( aportInfo[ i ][ aportCreated ] == 1 ) {
format( DialogStrgEx, sizeof( DialogStrgEx ), "%s%s\n", DialogStrgEx, aportInfo[ i ][ aportName ] );
}
}
SPD(playerid, 9813, DSL, "Project", DialogStrgEx, "da", "ne" );
}
else return SCM( playerid,-1,"Niste u mogucnosti koristiti ovu komandu." );
return true;
}
YCMD:kreirajaport(playerid,params[],help)
{
if(PI[ playerid ][ pAdmin ] >= 7 )
{
SPD( playerid, 9814, DSI, "Project", "Unesite ime ovog mesta za Admin port.", "DA", "NE" );
SCM(playerid,-1,"Uspesno ste kreirali lokaciju");
}
return true;
}
fDialog(9813) {
if( !response )
if( response ) {
new tmpcar = GetPlayerVehicleID( playerid );
if( GetPlayerState( playerid ) == 2 ) {
JBC_SetVehiclePos( tmpcar, aportInfo[ listitem ][ aportPos ][ 0 ], aportInfo[ listitem ][ aportPos ][ 1 ], aportInfo[ listitem ][ aportPos ][ 2 ] );
}
else
{
JBC_SetVehiclePos( playerid, aportInfo[ listitem ][ aportPos ][ 0 ], aportInfo[ listitem ][ aportPos ][ 1 ], aportInfo[ listitem ][ aportPos ][ 2 ] );
}
SetPlayerInterior( playerid, 0 );
SetPlayerVirtualWorld( playerid, 0 );
SCM(playerid,-1,""SPLAVA"[SA:RP] "BELA"Uspesno ste se teleportovali do lokacije %s.",aportInfo[listitem ][aportName]);
}
return true;
}
fDialog(9814) {
if( !response )
if( response )
{
new id = -1, Float:PozX, Float:PozY, Float:PozZ, nameaport[ 50 ];
for( new a = 0; a < MAX_APORTS; a++ ) {
if( aportInfo[ a ][ aportCreated ] != 1 )
{
id = a;
break;
}
else continue;
}
if( id == -1 ) return SCM( playerid,-1,"Nema vise mesta za kreiranje Admin TEAM portova." );
if( sscanf( inputtext, "s[50]", nameaport ) ) return SPD( playerid, 9814, DSI, "Test", "Unesite ime ovog mesta za Admin TEAM port.", "da", "ne" );
GetPlayerPos( playerid, PozX, PozY, PozZ );
aportInfo[ id ][ aportID ] = id;
aportInfo[ id ][ aportCreated ] = 1;
aportInfo[ id ][ aportPos ][ 0 ] = PozX;
aportInfo[ id ][ aportPos ][ 1 ] = PozY;
aportInfo[ id ][ aportPos ][ 2 ] = PozZ;
strmid( aportInfo[ id ][ aportName ], nameaport, 0, strlen( nameaport ), 50 );
SaveAports( );
SCM(playerid,-1,""SPLAVA"[SA:RP] "BELA"Uspesno si kreirao novu lokaciju za Admin TEAM port." );
}
return true;
}[/pawn]