/tfrase {D900D3} Rosa
#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 done by 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 entered the 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: You swapped frase to %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 , "[ERROR] You do not and admin rcon" ) ;
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 , "[BUG] This player is not online" ) ;
DOF2_SetString ( file , "Frase", TFrase) ;
format ( str , sizeof ( str ) , "(TFS) Admin %s changed the phrase id %i to: %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 , "[ERROR] You do not and admin rcon" ) ;
if ( sscanf ( params , "ss", Conta , TFrase ) )
return SendClientMessage ( playerid , -1 , "[CMD] / editarfraseoff [ACCOUNT] [NEW PHRASE]" ) ;
format ( file , sizeof ( file ) , NFST , Conta ) ;
if( !DOF2_FileExists ( file ) )
return SendClientMessage ( playerid , -1 , "This account does not exist" ) ;
DOF2_SetString ( file , "Frase", TFrase) ;
format ( str , sizeof ( str ) , "(TFS) Admin %s has changed the phrase from %s to %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;
}
Mauricio Moraes By mau.tito
Very Nice mau.tito
#BR: Mano tem uns errinhos de inglкs ali mais do um desconto ioewieowie' ![]() |