Ahh blz ! Mas c sabe como bloquear os outros tipos de /su ?
Tipo .. Permitir somente DOP, TH, DA ...
Coloquei assim:
pawn Code:
if(strcmp(cmd, "/suspeito", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pMember] == 21 && PlayerInfo[playerid][pMember] == 14 && PlayerInfo[playerid][pMember] == 2)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo estб indentificado, pegue seu crachб no LSPD HQ.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: (/su)speito [playerid/Parte-do-Nick] [descriзгo crime]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pMember] == 14)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (gTeam[giveplayerid] != 2 || PlayerInfo[giveplayerid][pMember] != 7 || PlayerInfo[giveplayerid][pLeader] != 7 || PlayerInfo[giveplayerid][pLeader] != 21 || PlayerInfo[giveplayerid][pMember] != 21)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
new crime;
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, "USO: (/su)speito [playerid/Parte-do-Nick] [descriзгo crime]");
return 1;
}
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se dar su!"); return 1; }
switch(crime)
{
case 0: {(strcmp(result,"DOP",true) == 0) { result = "Desobediкncia a ordem policial"; }}//LINHA 33998
case 1: {(strcmp(result,"TH",true) == 0) { result = "Tentativa de homicнdio"; }}
case 2: {(strcmp(result,"AP",true) == 0) { result = "Ajuste de pena"; }}
case 3: {(strcmp(result,"CA",true) == 0) { result = "Contrabando de armas"; }}
case 4: {(strcmp(result,"CD",true) == 0) { result = "Contrabando de drogas"; }}
case 5: {(strcmp(result,"RV",true) == 0) { result = "Roubo de Veнculo"; }}
case 6: {(strcmp(result,"RM",true) == 0) { result = "Rejeiзгo de multa"; }}
case 7: {(strcmp(result,"RP",true) == 0) { result = "Resistencia a prisгo"; }}
case 8: {(strcmp(result,"ILR",true) == 0) { result = "Invasгo a Local Restrito"; }}
case 9: {(strcmp(result,"RMD",true) == 0) { result = "Rejeiзгo a Mostrar Documentos"; }}
case 10: {(strcmp(result,"DA",true) == 0) { result = "Desacato б Autoridade"; }}
case 11: {(strcmp(result,"PIA",true) == 0) { result = "Porte Ilegal de Armas"; }}
case 12: {(strcmp(result,"CF",true) == 0) { result = "Cumplice de Fugas"; }}
}
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] += 1; }
else{WantedPoints[giveplayerid]+= 1;}
SetPlayerCriminal(giveplayerid,playerid, result);
WantedPoints[giveplayerid] += 1;
TextDrawHideForPlayer(giveplayerid,tGP2[giveplayerid]);
TextDrawShowForPlayer(giveplayerid,tGP3[giveplayerid]);
return 1; // TEM MAIS LINHAS AQUI ABAIXO MAS NUM VO COLOCAR
Mas ta dando esses erros:
pawn Code:
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(33998) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(33999) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34000) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34001) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34002) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34003) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34004) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34005) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34006) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34007) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34008) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34009) : error 029: invalid expression, assumed zero
D:\samp03csvr_win32\samp03csvr_win32\gamemodes\BFL.pwn(34010) : error 029: invalid expression, assumed zero