[Ajuda] Remover dos procurados
#1

Ja tentei fazer desse cmd assim: /removerlistap [id] [motivo] mais nгo consigo, ai tinha que apareзer pra todos O policial % removeu da lista de procurados o jogador %.

pawn Код:
if(strcmp(cmd, "/removerlistap", true) == 0)
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "pAdm01") == 1){
new tmp[256];
tmp = strtok(cmdtext, idx);
new plid;
plid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFD39BAA, "Use: /removerlistap [id]");
return 1;
}
if(IsPlayerConnected(plid))
{
    new str[128];
    new giveplayer[MAX_PLAYER_NAME];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(plid, giveplayer, sizeof(giveplayer));
    format(str, sizeof(str), "{0099FF}[x]{CCCCFF} O policial %s tirou vocк da lista de procurados!", sendername);
    SendClientMessage(plid, 0xFFD39BAA, str);
    format(str, sizeof(str), "{0099FF}[x]{CCCCFF} Vocк retirou o jogador %s da lista de procurados!", giveplayer);
    SendClientMessage(playerid, 0xFFD39BAA, str);
    dini_IntSet(file, "Procurado", 0);
    SetPlayerWantedLevel(plid, 0);
    Procurados[plid]= 0;
    return 1;
    }
    else
    {
    SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
    return 1;
}
}
Reply
#2

https://sampwiki.blast.hk/wiki/Format

SendClientMessage.
GetPlayerName.
Reply
#3

Consegui colocar pra todos verem que o policial removeu dos procurados tal jogador, mais nгo consegui colocar pra apareзer o motivo tipo /removerlistap [id] [motivo] O policial removeu o pelo motivo teste

pawn Код:
if(strcmp(cmd, "/removerlistap", true) == 0)
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "pAdm01") == 1){
new tmp[256];
tmp = strtok(cmdtext, idx);
new plid;
plid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFD39BAA, "Use: /removerlistap [id]");
return 1;
}
if(IsPlayerConnected(plid))
{
    new str[128];
    new giveplayer[MAX_PLAYER_NAME];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
    format(string, sizeof(string), "O policial %s removeu o jogador %s da lista de procurados!", playername);
    SendClientMessageToAll(AzulLindo, string);
    format(str, sizeof(str), "{0099FF}[x]{CCCCFF} Vocк retirou o jogador %s da lista de procurados!", giveplayer);
    SendClientMessage(playerid, 0xFFD39BAA, str);
    dini_IntSet(file, "Procurado", 0);
    SetPlayerWantedLevel(plid, 0);
    Procurados[plid]= 0;
    return 1;
    }
    else
    {
    SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
    return 1;
}
}
Reply
#4

strtok?
Reply
#5

? n entendi
Reply
#6

Usa sscanf , 10x melhor que strtok , vocк cria esse comando em 1 minuto.


#topic :
faiz mais um tmp definindo o motivo agora maninho.
mto simples.
й ke ta tarde aqui , se nao eu faziia
fllw


aki sao 02:50AM kkkkkkkk
Reply
#7

eu nao sei fazer
eu tenho vontade de aprender, mais a unica coisa que eu sei fazer й um comando que quando ele digitar /seucomando apareзe pra todos Mensagem aqui, seu comando!
sу sei fazer isso
Reply
#8

Quote:
Originally Posted by Arthenry
Посмотреть сообщение
eu nao sei fazer
eu tenho vontade de aprender, mais a unica coisa que eu sei fazer й um comando que quando ele digitar /seucomando apareзe pra todos Mensagem aqui, seu comando!
sу sei fazer isso
Nгo sabe fazer porque nгo quer, porque se vocк quisesse vocк jб sabia muita coisa e esses seus 287 posts inъteis pedindo ajuda possivelmente jб nгo seria essa quantidade, mas tudo bem vocк que sabe, o forum dispхe de muitos tutoriais.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)