[Ajuda] Filterscript
#1

Galera tou usando esse fs mais ele ta crianda linha sem nada escrita quando o player entra e quando o player sai ja tentei arrumar mais nгo consegui..
pawn Код:
#include        a_samp
#include        DOF2
#include        zcmd
#include        sscanf2

#define         MAX_TITO                 50
#define         NFST                     "CFrases/%s.ini"
#define         CallBack::%0(%1)         forward %0(%1); \
                                           public %0(%1)

new PlayerName [ MAX_TITO ] [ 50 ];

public OnFilterScriptInit ( )
{
    print("|--- FS ---|\n" "Fs feito por Mauricio Moraes By mau tito");
    return 1;
}

public OnFilterScriptExit ( )
{
    return 1;
}

public OnPlayerConnect ( playerid )
{
    new file [ 50 ],
                    tito [ 100 ];

    CkeckNick ( playerid ) ;

    format ( file , sizeof ( file ) , NFST , PlayerName[ playerid ] ) ;

    if( !DOF2_FileExists ( file ) )
    {
        DOF2_CreateFile ( file );
        DOF2_SetString ( file , "Frase",  "N/A" ) ;
        DOF2_SaveFile();
    }

    format ( tito , sizeof ( tito ) , "Conect : %s entrou no server : %s ", PlayerName[ playerid ] , DOF2_GetString ( file , "Frase" ) ) ;
    SendClientMessageToAll ( -1 , tito);
    return 1;
}

command(tfrase, playerid , params [] )
{
    new str [ 80 ] ,
                    TFrase [ 80 ] ,
                                   file [ 50 ];

    if ( sscanf ( params , "s", TFrase ) )
        return SendClientMessage ( playerid , -1 , "[CMD] /tfrase [ NOVA FRASE ] " ) ;

    format ( file , sizeof ( file ) , NFST , PlayerName[ playerid ] ) ;
    DOF2_SetString ( file , "Frase", TFrase ) ;
    format ( str  ,sizeof ( str ) , "TFS: Vocк trocou a fraase para %s" , TFrase ) ;
    SendClientMessage ( playerid , -1 , str ) ;
    DOF2_SaveFile();
    return 1;
}

command(editarfrase, playerid, params [] )
{
     new file [ 50 ] ,
                     ID ,
                        TFrase [ 75 ] ,
                                      str [ 95 ] ;

     if( !IsPlayerAdmin ( playerid ) )
        return SendClientMessage ( playerid , -1 , "[Erro] Vocк nгo e um ARcon" ) ;

     if ( sscanf ( params , "is", ID , TFrase ) )
        return SendClientMessage ( playerid , -1 , "[CMD] /editarfrase [ ID ] [ FRASE NOVA ] " ) ;

     format ( file , sizeof ( file ) , NFST , PlayerName[ ID ] ) ;

     if( !IsPlayerConnected ( ID ) )
        return SendClientMessage ( playerid , -1 , "[Erro] Este player nгo esta online" ) ;

     DOF2_SetString ( file , "Frase",  TFrase) ;

     format ( str , sizeof ( str ) , "(TFS) O Admin %s trocou a frase do id %i , para : %s", PlayerName[ playerid ] , ID , TFrase ) ;
     SendClientMessage ( playerid , -1 , str ) ;
     DOF2_SaveFile();
     return 1;
}

command(editarfraseoff, playerid, params [] )
{
     new file [ 50 ] ,
                     Conta [ 50 ] ,
                                  TFrase [ 75 ] ,
                                                str [ 95 ] ;

     if( !IsPlayerAdmin ( playerid ) )
        return SendClientMessage ( playerid , -1 , "[Erro] Vocк nгo e um ARcon" ) ;

     if ( sscanf ( params , "ss", Conta , TFrase ) )
        return SendClientMessage ( playerid , -1 , "[CMD] /editarfraseoff [CONTA ] [FRASE NOVA]" ) ;

     format ( file , sizeof ( file ) , NFST , Conta ) ;
     if( !DOF2_FileExists ( file ) )
        return SendClientMessage ( playerid , -1 , "Esta Conta nгo existe" ) ;

     DOF2_SetString ( file , "Frase",  TFrase) ;

     format ( str , sizeof ( str ) , "(TFS) O Admin %s trocou a frase da conta %s , para : %s", PlayerName[ playerid ] , Conta , TFrase ) ;
     SendClientMessage ( playerid , -1 , str ) ;
     DOF2_SaveFile();
     return 1;
}

CallBack::CkeckNick ( playerid )
{
    new mauricio [ MAX_PLAYER_NAME ] ;
    GetPlayerName ( playerid , mauricio , sizeof ( mauricio ) ) ;
    PlayerName[ playerid ] = mauricio ;
    return 1;
}
Reply
#2

@ Ja resolvi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)