SA-MP Forums Archive
[Pedido] Sub - Lider ... - 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: [Pedido] Sub - Lider ... (/showthread.php?tid=163814)



[Pedido] Sub - Lider ... - rezzutto - 29.07.2010

Eaw galerinha ...

pow gente eu queria saber como eu faco para colocar o sub lider usar o comando /convidar ...
jah tentei tudo o pouco que sabia sera que alguem poderia posta o CODE para mim ??
grato !!!


Re: [Pedido] Sub - Lider ... - Gabriel_Halls - 29.07.2010

se eu nao engano procure no seu GM /convidar e vai estar assim

Код:
	if(strcmp(cmd, "/convidar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [ id ]");
				return 1;
			}
			new para1;
			new ftext[20];
			para1 = ReturnUser(tmp);
			if (PlayerInfo[playerid][pLider] >= 1)
            if(PlayerInfo[playerid][pCargo] < 6)
			{
			    if(IsPlayerConnected(para1))
			    {
			        if(PlayerInfo[para1][pLevel] < 2) { SendClientMessage(playerid, COLOR_GREY, "So pode convidar quem й nivel 2 ou acima de 2!!!"); return 1;
					}
					if(para1 != INVALID_PLAYER_ID)
ai aonde dis
if (PlayerInfo[playerid][pLider] >= 1) add em baicho
if(PlayerInfo[playerid][pCargo] < 6)
se eu nao me engano e assim vlw!


Re: [Pedido] Sub - Lider ... - Mateus_Henrique - 29.07.2010

Gabriel_Halls nao й assim?

pawn Код:
if(strcmp(cmd, "/convidar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [ id ]");
                return 1;
            }
            new para1;
            new ftext[20];
            para1 = ReturnUser(tmp);
            if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] < 6 )
            {
                if(IsPlayerConnected(para1))
                {
                    if(PlayerInfo[para1][pLevel] < 2) { SendClientMessage(playerid, COLOR_GREY, "So pode convidar quem й nivel 2 ou acima de 2!!!"); return 1;
                    }
                    if(para1 != INVALID_PLAYER_ID)