if(strcmp(cmd, "/multar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return true;
}
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return true;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /multar [ID] [Custo] [Razao]");
return true;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /multar [ID] [Custo] [Razao]");
return true;
}
moneys = strval(tmp);
if(moneys < 1000 || moneys > 30000) { SendClientMessage(playerid, COLOR_GREY, "Custo entre 1000 e 30000 !"); return true; }
if(IsPlayerConnected(giveplayerid))
{
if(IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode multar Policiais!");
return true;
}
if(PlayerInfo[giveplayerid][pJailed] > 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode multar jogadores que estejam presos!");
return true;
}
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(25.0, playerid, giveplayerid))
{
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: /multar [ID] [Custo] [Razao]");
return true;
}
format(string, sizeof(string), "* Vocк multou %s por R$%d, Razao: %s", giveplayer, moneys, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oficial %s lhe aplicou uma multa no valor de R$%d, Razao: %s", sendername, moneys, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Use /aceitar multa, para aceita-la.");
//SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Se em 5 minutos vocк nгo pagar, irб preso!");
TicketOffer[giveplayerid] = playerid;
TicketMoney[giveplayerid] = moneys;
//SetTimerEx("PresoMulta", 300000, false, "i", giveplayerid);
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "O jogador estб longe !");
return true;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "O jogador estб Offline !");
return true;
}
}
return true;
}
if( !strcmp( cmd, "/algemar", true ))
{
if( pInfo[ playerid ][ Prof ] == POL_CIVIL || pInfo[ playerid ][ Prof ] == POL_MILITAR || pInfo[ playerid ][ Prof ] == DELEGADO || pInfo[ playerid ][ Prof ] == SWAT || pInfo[ playerid ][ Prof ] == EXERCITO || pInfo[ playerid ][ Prof ] == POL_RODOVIARIA || aInfo[ playerid ][ Patrao ] == 1 || aInfo[ playerid ][ Admin ] == 1 )
{
if( pInfo[ playerid ][ fardado ] == 0 && aInfo[ playerid ][ Patrao ] == 0 && aInfo[ playerid ][ Admin ] == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб fardado(a) !" );
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк precisa estб fardado(a) para algemar um(a) jogador(a) !" );
return 1;
}
tmp = strtok( cmdtext, idx );
if( !strlen( tmp ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /Algemar [ ID ] [ Motivo ]" );
return 1;
}
new
id = strval( tmp )
;
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_ERRO, "[ x ] Uso correto: /Algemar [ ID ] [ Motivo ]" );
return 1;
}
if( !IsPlayerConnected( id ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" );
return 1;
}
if( Algemou[ playerid ] == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Aguarde 1 minuto para algemar novamente !" );
return 1;
}
if( Algemou[ playerid ] > gettime( ))
{
format( gStr, sizeof( gStr ), "[ x ] Aguarde %d segundos para poder algemar um(a) jogador(a) !", Algemou[ playerid ] - gettime( ));
SendClientMessage( playerid, COLOR_ERRO, gStr );
return 1;
}
if( playerid == id )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode algemar vocк mesmo !" );
return 1;
}
if( Algemado[ id ] == 1 )
{
MensagemFormatada( playerid, COLOR_SISTEMA, "[ x ] O(A) jogador(a) %s jб estб algemado(a) !", PlayerName( id ));
return 1;
}
if( IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode algemar de dentro de um veнculo !" );
return 1;
}
if( IsPlayerInAnyVehicle( id ))
{
MensagemFormatada( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode algemar %s pois ele(a) estб dentro de um veнculo !", PlayerName( id ));
return 1;
}
if( GetDistanceBetweenPlayers( playerid, id ) > 15 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк estб muito longe, chegue mais perto !" );
return 1;
}
TogglePlayerControllable( id, false );
GameTextForPlayer( id, "~w~ALGEMADO!", 3000, 0 );
format( gStr, sizeof( gStr ), "[ ALGEMAS ] %s algemou vocк pelo Motivo: {FFFFFF}%s", PlayerName( playerid ), result );
SendClientMessage( id, 0x3366FFAA, gStr );
format( gstring, sizeof( gstring ), "[ ALGEMAS ] Vocк algemou o jogador(a) %s pelo Motivo: {FFFFFF}%s", PlayerName( id ), result );
SendClientMessage( playerid, 0x33CCFFAA, gStr );
Algemou[ playerid ] = gettime() + 60;
Algemado[ id ] = 1;
P_Liberado[ id ] = SetTimerEx( "LiberadoParaAndar", 30000, false, "d", id );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem permissгo !" );
}
return 1;
}
CMD:me_kick(playerid) {
if(!IsPlayerAdmin(playerid && Dados[playerid][Admin] == 0)) return SendClientMessage(playerid, -1, "Vocк nгo й administrador.");
SendClientMessage(playerid, -1, "Vocк se auto kickou.") && Kick(playerid));
return 1;
}
if(strcmp(cmd,"/multar", true) == 0) { if( pInfo[ playerid ][ Prof ] == POL_CIVIL || pInfo[ playerid ][ Prof ] == POL_MILITAR || pInfo[ playerid ][ Prof ] == DELEGADO || pInfo[ playerid ][ Prof ] == SWAT || pInfo[ playerid ][ Prof ] == EXERCITO || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Gerente ] == 1 || !strcmp( playerClan[ playerid ], "F.B.I", true ) ) { if( pInfo[ playerid ][ fardado ] == 0 && aInfo[ playerid ][ Admin ] == 0 && aInfo[ playerid ][ Gerente ] == 0 && !strcmp( playerClan[ playerid ], "F.B.I", true ) ) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб fardado(a) !" ); SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк precisa estб fardado(a) para adicionar um(a) jogador(a) na lista de perseguiзхes!" ); return 1; } new id = strval( tmp ) ; new msg[256]; new plid,tempo; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_ERRO,"[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]"); return 1; } plid = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)){ SendClientMessage(playerid, COLOR_ERRO,"[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]"); return 1; } tempo = strval(tmp); msg = strrest(cmdtext, idx); if(!strlen(msg)){ SendClientMessage(playerid, COLOR_ERRO,"[[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]"); return 1; } if(tempo > 5000 || tempo < 100){ SendClientMessage(playerid, COLOR_ERRO,"[ x ] Multa mбxima de R$5.000 e minima de R$100!"); return 1; } if(Multou[ playerid ] == 1) { SendClientMessage(playerid, COLOR_ERRO, "[ x ] Aguarde '1 minuto' para multar novamente!"); return 1; } if( playerid == id && aInfo[ playerid ][ Admin ] == 0 ) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode se multar !" ); return 1; } if(Multou[ playerid ] > gettime()) { format(gStr, sizeof(gStr), "[ x ] Aguarde %d segundos para poder multar um(a) jogador(a)!", Multou[playerid] - gettime()); SendClientMessage(playerid, COLOR_ERRO, gStr); return 1; } if( GetDistanceBetweenPlayers( playerid, id ) > 15 ) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк estб muito longe, chegue mais perto !" ); return 1; } if(IsPlayerConnected(plid)){ new pname[ MAX_PLAYER_NAME ]; GetPlayerName(plid, pname, MAX_PLAYER_NAME); format(string, sizeof(string),"O(A) Policial(a) %s multou vocк em R$ %d ( Motivo: %s.)", PlayerName( playerid ),tempo, msg); SendClientMessage(plid,0x33AAFFFF, string); SendClientMessage(playerid, 0x33AAFFFF, "[ > ] Vocк multou o(a) jogador(a) com sucesso!"); GivePlayerCash( plid, -tempo ); Multou[playerid] = gettime() + 60; format(string, sizeof(string),"[ MULTA ] O(A) Policial(a) %s multou o(a) jogador(a) %s no valor de R$ %d. ( Motivo: %s. )", PlayerName( playerid ),pname, tempo, msg); SendClientMessageToAll(0x33AAFFFF, string); return 1; } else { SendClientMessage(playerid, COLOR_ERRO,"[ x ] Ninguйm online com esse ID"); return 1; } } }
(598) : error 017: undefined symbol "Multou"
(12941) : error 001: expected token: ";", but found "]"
(12941) : error 029: invalid expression, assumed zero
(12941) : fatal error 107: too many error messages on one line
if(strcmp(cmd,"/multar", true) == 0)
{
if( pInfo[ playerid ][ Prof ] == POL_RODOVIARIA || aInfo[ playerid ][ Dono ] == 1 || aInfo[ playerid ][ Admin ] == 1 )
{
if( pInfo[ playerid ][ fardado ] == 0 && aInfo[ playerid ][ Dono ] == 0 && aInfo[ playerid ][ Admin ] == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб fardado(a) !" );
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк precisa estб fardado(a) para adicionar um(a) jogador(a) na lista de perseguiзхes!" );
return 1;
}
new
id = strval( tmp )
;
new msg[256];
new plid,tempo;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ERRO,"[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]");
return 1;
}
plid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, COLOR_ERRO,"[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]");
return 1;
}
tempo = strval(tmp);
msg = strrest(cmdtext, idx);
if(!strlen(msg)){
SendClientMessage(playerid, COLOR_ERRO,"[[ x ] Use /Multar [ ID ] [ Quantia ] [ Motivo ]");
return 1;
}
if(tempo > 5000 || tempo < 100){
SendClientMessage(playerid, COLOR_ERRO,"[ x ] Multa mбxima de R$5.000 e minima de R$100!");
return 1;
}
if(Multou[ playerid ] == 1)
{
SendClientMessage(playerid, COLOR_ERRO, "[ x ] Aguarde '1 minuto' para multar novamente!");
return 1;
}
if( playerid == id && aInfo[ playerid ][ Admin ] == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode se multar !" );
return 1;
}
if(Multou[ playerid ] > gettime())
{
format(gStr, sizeof(gStr), "[ x ] Aguarde %d segundos para poder multar um(a) jogador(a)!", Multou[playerid] - gettime());
SendClientMessage(playerid, COLOR_ERRO, gStr);
return 1;
}
if( GetDistanceBetweenPlayers( playerid, id ) > 15 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк estб muito longe, chegue mais perto !" );
return 1;
}
if(IsPlayerConnected(plid)){
new pname[ MAX_PLAYER_NAME ];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string),"O(A) Policial(a) %s multou vocк em R$ %d ( Motivo: %s.)", PlayerName( playerid ),tempo, msg);
SendClientMessage(plid,0x33AAFFFF, string);
SendClientMessage(playerid, 0x33AAFFFF, "[ > ] Vocк multou o(a) jogador(a) com sucesso!");
GivePlayerCash( plid, -tempo );
Multou[playerid] = gettime() + 60;
format(string, sizeof(string),"[ MULTA ] O(A) Policial(a) %s multou o(a) jogador(a) %s no valor de R$ %d. ( Motivo: %s. )", PlayerName( playerid ),pname, tempo, msg);
SendClientMessageToAll(0x33AAFFFF, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_ERRO,"[ x ] Ninguйm online com esse ID");
return 1;
}
}
}
Luan, e FS, era tipo fazer que nem o THUG, deixar o comando parecido com o de algemar tendeu...
Thug, deu esses erros: PHP код:
PHP код:
|
new Multou[MAX_PLAYERS];
new tipo[MAX_PLAYERS];
// para
new tipo[ MAX_PLAYERS ];