Originally Posted by MarlboroBr
Luan, e FS, era tipo fazer que nem o THUG, deixar o comando parecido com o de algemar tendeu...
Thug, deu esses erros:
PHP код:
(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
Cуdigo:
PHP код:
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;
}
}
}
|