if(strcmp(cmd, "/avisar", true) == 0)
{
if(GetPlayerLevel(playerid) < 2)
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,0x007FFFAA,"Use:/avisar [ID]");
return 1;
}
new Avisado[128];
SendClientMessage(playerid,0x007FFFAA,"Vocк Avisou O Player %s Com Sucesso!",Avisado);
SendPlayerMessageToPlayer(playerid,0x007FFFAA,"Vocк Foi Avisado Pelo Admin %s",PlayerName);
SendClientMessageToAll(0x007FFFAA,"O Admin %s Deu Um Aviso Ao Player %s",PlayerName,Avisado);
return 1;
}
C:\Users\Douglas Cabral\Desktop\Servidores\Servidor Samp 0.3x\gamemodes\Brasil Morte Certa\Brasil Morte Certa\gamemodes\MorteCerta17.pwn(2796) : warning 202: number of arguments does not match definition
C:\Users\Douglas Cabral\Desktop\Servidores\Servidor Samp 0.3x\gamemodes\Brasil Morte Certa\Brasil Morte Certa\gamemodes\MorteCerta17.pwn(2797) : error 076: syntax error in the expression, or invalid function call
C:\Users\Douglas Cabral\Desktop\Servidores\Servidor Samp 0.3x\gamemodes\Brasil Morte Certa\Brasil Morte Certa\gamemodes\MorteCerta17.pwn(2798) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
SendClientMessage(playerid,0x007FFFAA,"Vocк Avisou O Player %s Com Sucesso!",Avisado);
SendPlayerMessageToPlayer(playerid,0x007FFFAA,"Vocк Foi Avisado Pelo Admin %s",PlayerName);
SendClientMessageToAll(0x007FFFAA,"O Admin %s Deu Um Aviso Ao Player %s",PlayerName,Avisado);
if(strcmp(cmd, "/avisar", true) == 0)
{
if(GetPlayerLevel(playerid) < 2)
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,0x007FFFAA,"Use:/avisar [ID]");
return 1;
}
new Avisado[128];
new Razao[128];
format(string, sizeof(string), "|MCAdmin|:Vocк Deu Um Aviso Ao Player %s.Motivo:%s",Avisado,Razao);
SendClientMessage(playerid,0x007FFFAA, string);
format(string, sizeof(string), "|MCAdmin|:Vocк Foi Avisado Pelo Admin %s.Motivo:%s",NomePlayer,Razao);
SendPlayerMessageToPlayer(playerid,0x007FFFAA, string);
format(string, sizeof(string), "|MCAdmin|:O Player %s Foi Avisado Pelo Admin %s.Motivo:",Avisado,NomePlayer,Razao);
SendClientMessageToAll(0x007FFFAA, string);
return 1;
}
if( strcmp( cmd, "/avisar", true ) == 0 ) { if( aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Moderador ] == 1 ) { tmp = strtok( cmdtext, idx ); if( !strlen( tmp )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /avisar [ ID ] [ aviso ]" ); return 1; } new id = strval( tmp ); MSG = strrest( cmdtext, idx ); if( !strlen( MSG )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /avisar [ ID ] [ aviso ]" ); return 1; } if( !IsPlayerConnected( id )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" ); return 1; } ++ aviso[ id ]; if( aviso[ id ] >= 3 ) { GameTextForPlayer( id, "~b~~h~Kickado(a)~w~~h~!", 15000, 5 ); format( string, sizeof( string ), "[ > ] Vocк foi kickado do servidor ( Motivo: %s ) ( %d/3 )", MSG, aviso[ id ] ); SendClientMessage( id, COLOR_ERRO, string ); return Kick( id ); } if( aInfo[ playerid ][ Moderador ] == 1 ) { format( string, sizeof( string ), "* O(A) moderador(a) %s deu um aviso para %s ( Motivo: %s ) ( %d/3 )", PlayerName( playerid ), PlayerName( id ), MSG, aviso[ id ] ); SendClientMessageToAll( 0xCCFF00AA, string ); format( string, sizeof( string ), "( AVISO ) Vocк foi avisado %d/3, 3/3 vocк serб kickado !", aviso[ id ] ); SendClientMessage( id, COLOR_BRANCO, string ); } if( aInfo[ playerid ][ Admin ] == 1 ) { format( string, sizeof( string ), "* O(A) administrador(a) %s deu um aviso para %s ( Motivo: %s ) ( %d/3 )", PlayerName( playerid ), PlayerName( id ), MSG, aviso[ id ] ); SendClientMessageToAll( 0xCCFF00AA, string ); format( string, sizeof( string ), "( AVISO ) Vocк foi avisado %d/3, 3/3 vocк serб kickado !", aviso[ id ] ); SendClientMessage( id, COLOR_BRANCO, string ); } } else { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem permissгo !" ); } return 1; }
Substitue este codigo por esse e poste Resultados
Code:
if( strcmp( cmd, "/avisar", true ) == 0 ) { if( aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Moderador ] == 1 ) { tmp = strtok( cmdtext, idx ); if( !strlen( tmp )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /avisar [ ID ] [ aviso ]" ); return 1; } new id = strval( tmp ); MSG = strrest( cmdtext, idx ); if( !strlen( MSG )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /avisar [ ID ] [ aviso ]" ); return 1; } if( !IsPlayerConnected( id )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" ); return 1; } ++ aviso[ id ]; if( aviso[ id ] >= 3 ) { GameTextForPlayer( id, "~b~~h~Kickado(a)~w~~h~!", 15000, 5 ); format( string, sizeof( string ), "[ > ] Vocк foi kickado do servidor ( Motivo: %s ) ( %d/3 )", MSG, aviso[ id ] ); SendClientMessage( id, COLOR_ERRO, string ); return Kick( id ); } if( aInfo[ playerid ][ Moderador ] == 1 ) { format( string, sizeof( string ), "* O(A) moderador(a) %s deu um aviso para %s ( Motivo: %s ) ( %d/3 )", PlayerName( playerid ), PlayerName( id ), MSG, aviso[ id ] ); SendClientMessageToAll( 0xCCFF00AA, string ); format( string, sizeof( string ), "( AVISO ) Vocк foi avisado %d/3, 3/3 vocк serб kickado !", aviso[ id ] ); SendClientMessage( id, COLOR_BRANCO, string ); } if( aInfo[ playerid ][ Admin ] == 1 ) { format( string, sizeof( string ), "* O(A) administrador(a) %s deu um aviso para %s ( Motivo: %s ) ( %d/3 )", PlayerName( playerid ), PlayerName( id ), MSG, aviso[ id ] ); SendClientMessageToAll( 0xCCFF00AA, string ); format( string, sizeof( string ), "( AVISO ) Vocк foi avisado %d/3, 3/3 vocк serб kickado !", aviso[ id ] ); SendClientMessage( id, COLOR_BRANCO, string ); } } else { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem permissгo !" ); } return 1; } |
Blle,mas pode pegar o codigo que lhe passei,para ver onde esta errando ...
|