08.01.2011, 20:51
Eu tirei aqui e parece que desativo o comando /ban!
Porque ele й ligado com o /ban eu acho! Porque o Knife que fez pra mim.
Aqui o codigo do meu meu /ban:
Porque ele й ligado com o /ban eu acho! Porque o Knife que fez pra mim.
Aqui o codigo do meu meu /ban:
pawn Код:
if ( strcmp( cmd, "/ban", true) == 0)
{
if ( IsPlayerConnected( playerid) )
{
tmp = strtok( cmdtext, idx) ;
if ( !strlen( tmp) )
{
SendClientMessage( playerid, COLOR_GRAD2, "Use : /ban [Id / Nome] [razгo]") ;
return 1 ;
}
giveplayerid = ReturnUser( tmp) ;
if ( PlayerInfo[playerid][pAdmin] >= 1)
{
if ( IsPlayerConnected( giveplayerid) && PlayerInfo[giveplayerid][pAdmin] == 0)
{
if ( giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName( giveplayerid, giveplayer, sizeof( giveplayer) ) ;
GetPlayerName( playerid, sendername, sizeof( sendername) ) ;
new length = strlen( cmdtext) ;
while ( ( idx < length) && ( cmdtext[idx] <= ' ') )
{
idx++ ;
}
new offset = idx ;
new result[64] ;
while ( ( idx < length) && ( ( idx - offset) < ( sizeof( result) - 1) ) )
{
result[idx - offset] = cmdtext[idx] ;
idx++ ;
}
result[idx - offset] = EOS ;
if ( !strlen( result) )
{
SendClientMessage( playerid, COLOR_GRAD2, "Use : /ban [Id / Nome] [reason]") ;
return 1 ;
}
new year, month,day ;
getdate( year, month, day) ;
if ( strcmp( result,"1",true) == 0) { result = "Uso de cheat" ; }
format( string, sizeof( string) , "%s foi banido por %s, razгo: %s ( %d-%d-%d) ", giveplayer, sendername, ( result) ,month,day,year) ;
BanLog( string) ;
format( string, sizeof( string) , "%s foi banido por %s, razгo: %s", giveplayer, sendername, ( result) ) ;
SendClientMessageToAll( COLOR_LIGHTRED, string) ;
new cooordstring[256],lstring[256] ;
format( lstring, sizeof( lstring) , "Vocк foi banido pelo Administrador %s\n\nMotivo : %s\n\nCaso ache que foi algum erro visite nosso forum\n FORUM AKI\n",sendername,( result) ) ;
strcat( cooordstring,lstring) ;
ShowPlayerDialog( giveplayerid, 1000, DIALOG_STYLE_MSGBOX, "Banido", cooordstring, "Ok", "Fechar") ;
strmid( BanInfo[giveplayerid][bMotivo], string, 0, strlen( string) , 256) ;
strmid( BanInfo[giveplayerid][bQuemBaniu], giveplayer, 0, strlen( giveplayer) , 256) ;
BanInfo[giveplayerid][bBan] = 1 ;
SBan( giveplayerid) ;
return 1 ;
}
}//not connected
}
else
{
format( string, sizeof( string) , " %d is not an active player.", giveplayerid) ;
SendClientMessage( playerid, COLOR_GRAD1, string) ;
}
}
return 1 ;
}