SA-MP Forums Archive
[Ajuda] Como seta pra sу policiais revistar ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Como seta pra sу policiais revistar ? (/showthread.php?tid=438944)



Como seta pra sу policiais revistar ? - Brunooh - 22.05.2013

Код HTML:
if(strcmp(cmd, "/revistar", true) == 0)
	{
		new plid;

		if(sscanf(cmdtext, "s[7]u", cmd, plid))
		{
			SendClientMessage(playerid, COLOR_GREEN, "Use /revistar [id]");
			return 1;
		}
		if(IsPlayerConnected(plid))
		{
			if(GetDistanceBetweenPlayers(plid, playerid) < 21)
			{
				format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(plid));

				SendClientMessage(playerid, verdel, "~~~~~~~~~~~~~~ REVISTANDO ~~~~~~~~~~~~~~");

				format(string, sizeof(string), "- Maconha: %d", dini_Int(file, "Maconha"));
				SendClientMessage(playerid, 0xFFFFFFAA, string);

				format(string, sizeof(string), "- Crack: %d", dini_Int(file, "Crack"));
				SendClientMessage(playerid, 0xFFFFFFAA, string);

				format(string, sizeof(string), "- Cocaina: %d", dini_Int(file, "Cocaina"));
				SendClientMessage(playerid, 0xFFFFFFAA, string);

				SendClientMessage(playerid, Vermelho, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

				format(string, sizeof(string), "- Maconha no sangue: %d", dini_Int(file, "tmaconha"));
				SendClientMessage(playerid, 0xFFFFFFAA, string);

				format(string, sizeof(string), "- Crack no sangue: %d", dini_Int(file, "tcrack"));
				SendClientMessage(playerid, 0xFFFFFFAA, string);

				format(string, sizeof(string), "- Cocaнna no sangue: %d", dini_Int(file, "tcocaina"));
				SendClientMessage(playerid, 0xFFFFFFAA, string);

				SendClientMessage(playerid, verdel, "~~~~~~~~~~~~~~ REVISTANDO ~~~~~~~~~~~~~~");

				format(string, sizeof(string), "Vocк estб revistando o(a) jogador(a) %s ", GetPlayerNameEx(plid));
				SendClientMessage(playerid, COLOR_GREEN, string);
			}
			else
			{
				SendClientMessage(playerid, Vermelho, "Chega mais perto para revistar!");
			}
		}
		else
		{
			SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
		}
		return 1;
	}
Variaveis de policiais :

Код HTML:
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
        if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 2 || PlayerInfo[playerid][SCON] == true)
Ajuda ainda nгo consseguii :/


Re: Como seta pra sу policiais revistar ? - Cidiei - 22.05.2013

@edit jб respondo


Re: Como seta pra sу policiais revistar ? - Brunooh - 23.05.2013

BLZ


Re: Como seta pra sу policiais revistar ? - Gii - 23.05.2013

pawn Код:
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") != Policial_C /* && dini_int(file, "Profissao") != ....*/)
    return SendClientMessage(playerid, -1, "Vocк nгo й policial!");



Re: Como seta pra sу policiais revistar ? - Brunooh - 23.05.2013

kkk tб serto '

Cidiei Posta aeh cmd com as profissoes setadas .


Re: Como seta pra sу policiais revistar ? - Gii - 23.05.2013

pawn Код:
if (strcmp(cmd, "/revistar", true) == 0) {
    format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
    if(dini_Int(file, "Profissao") != Policial_C && dini_Int(file, "Profissao") != Policial_F && dini_Int(file, "Profissao") != Delegado && dini_Int(file, "Profissao") != Bope && dini_Int(file, "Profissao") != Swat && dini_Int(file, "Profissao") != Narcoticos && dini_Int(file, "Profissao") != Policial_M && dini_Int(file, "Profissao") != FBI && dini_Int(file, "Profissao") != Interpol && dini_Int(file, "Profissao") != LSPD)
        return SendClientMessage(playerid, -1, "Vocк nгo й policial!");
    new plid;
    if (sscanf(cmdtext, "u", plid))
        return SendClientMessage(playerid, COLOR_GREEN, "Use /revistar [id]");
       
    if (IsPlayerConnected(plid)) {
        if (GetDistanceBetweenPlayers(plid, playerid) < 21) {
            format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(plid));
            SendClientMessage(playerid, verdel, "~~~~~~~~~~~~~~ REVISTANDO ~~~~~~~~~~~~~~");
            format(string, sizeof(string), "- Maconha: %d", dini_Int(file, "Maconha"));
            SendClientMessage(playerid, 0xFFFFFFAA, string);
            format(string, sizeof(string), "- Crack: %d", dini_Int(file, "Crack"));
            SendClientMessage(playerid, 0xFFFFFFAA, string);
            format(string, sizeof(string), "- Cocaina: %d", dini_Int(file, "Cocaina"));
            SendClientMessage(playerid, 0xFFFFFFAA, string);
            SendClientMessage(playerid, Vermelho, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
            format(string, sizeof(string), "- Maconha no sangue: %d", dini_Int(file, "tmaconha"));
            SendClientMessage(playerid, 0xFFFFFFAA, string);
            format(string, sizeof(string), "- Crack no sangue: %d", dini_Int(file, "tcrack"));
            SendClientMessage(playerid, 0xFFFFFFAA, string);
            format(string, sizeof(string), "- Cocaнna no sangue: %d", dini_Int(file, "tcocaina"));
            SendClientMessage(playerid, 0xFFFFFFAA, string);
            SendClientMessage(playerid, verdel, "~~~~~~~~~~~~~~ REVISTANDO ~~~~~~~~~~~~~~");
            format(string, sizeof(string), "Vocк estб revistando o(a) jogador(a) %s ", GetPlayerNameEx(plid));
            SendClientMessage(playerid, COLOR_GREEN, string);
        } else {
            SendClientMessage(playerid, Vermelho, "Chega mais perto para revistar!");
        }
    } else {
        SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
    }
    return true;
}
OBS:Nгo defini "file", entгo se aparecer erros simplesmente a define.


Re: Como seta pra sу policiais revistar ? - Brunooh - 23.05.2013

Foii sem erro , vф testa akiee se for aviso