[Ajuda] Cela admin muda skin de todos
#1

Fala galera, estou com um problema no sv rpg
assim que dou /cadeia (cela admin) a skin dos players mudam para de preso

Код:
	if(strcmp(cmd, "/cadeia", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [tempo] [motivo]");
				return 1;
			}
			if(JogadorInfo[playerid][pAdmin] < 2)
			{
				 return 1;
			}
			new length = strlen(cmdtext);
			new playa;
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			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, "USE: /cadeia [id] [tempo] [motivo]");
				return 1;
			}
			if(JogadorInfo[playa][pJailed] != 0 && JogadorInfo[playerid][pAdmin] < 4)
			{
				SendClientMessage(playerid,COLOR_YELLOW,"Vocк nгo pode soltar presos,sу admins nivel 4 + !");
				return 1;
  			}
			if (JogadorInfo[playerid][pAdmin] >= 2)
			{
				if(admtrabalhando[playerid] < 1 && JogadorInfo[playerid][pAdmin] != 1340 && JogadorInfo[playerid][pAdmin] != 1341 && JogadorInfo[playerid][pAdmin] != 1342)
				{
					SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
					return 1;
				}
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			            if(JogadorInfo[giveplayerid][pSex] == 1)
						{
							SetPlayerSkin(giveplayerid, 42);
						}
						else
						{
						    SetPlayerSkin(giveplayerid, 69);
						}
						SetPlayerSkin(playa, 268);
                        if(JogadorInfo[playa][pSex] == 2) {  SetPlayerSkin(playa, 69); }
                   	    if(JogadorInfo[playa][pSocio] >= 1) {  SetPlayerSkin(playa, 42); }
				        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						ResetPlayerWeaponsEx(playa);
						WantedPoints[playa] = 0;
						JogadorInfo[playa][pJailed] = 3;
						JogadorInfo[playa][pJailTime] = money*60;
						SetPlayerInterior(playa, 0);
						SetPlayerPos(playa, 1175.5886,-1182.0431,87.0254);
						format(string, sizeof(string), "ADMNCMD: %s Colocou %s por [%d] minutos na cadeia. Motivo: %s", PlayerName(playerid), giveplayer,money,(result));
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
						format(string, sizeof(string), "* Voзк prendeu %s,Motivo: %s.", giveplayer,(result));
						SendClientMessage(playerid, COLOR_LIGHTRED, string);
						if(admtrabalhando[playerid] < 1 && admhide[playerid] == 1)
						{
							format(string, sizeof(string), "* Vocк foi preso por [%d] minutos por algum Administrador.", money);
					        SendClientMessage(playa, COLOR_LIGHTBLUE, string);
						}
						else
						{
							format(string, sizeof(string), "* Vocк foi preso por [%d] minutos por %s.", money,sendername);
					        SendClientMessage(playa, COLOR_LIGHTBLUE, string);
						}
					    SetPlayerChatBubble(playa, ".", COLOR_RED, 1, 1);
					    return 1;
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo esta autorizado a usar este comando!");
			}
		}
		return 1;
	}
Reply
#2

Aqui, me diga se resulta,
pawn Код:
if(strcmp(cmd, "/cadeia", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [tempo] [motivo]");
                return 1;
            }
            if(JogadorInfo[playerid][pAdmin] < 2)
            {
                 return 1;
            }
            new length = strlen(cmdtext);
            new playa;
            new money;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            money = strval(tmp);
            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, "USE: /cadeia [id] [tempo] [motivo]");
                return 1;
            }
            if(JogadorInfo[playa][pJailed] != 0 && JogadorInfo[playerid][pAdmin] < 4)
            {
                SendClientMessage(playerid,COLOR_YELLOW,"Vocк nгo pode soltar presos,sу admins nivel 4 + !");
                return 1;
            }
            if (JogadorInfo[playerid][pAdmin] >= 2)
            {
                if(admtrabalhando[playerid] < 1 && JogadorInfo[playerid][pAdmin] != 1340 && JogadorInfo[playerid][pAdmin] != 1341 && JogadorInfo[playerid][pAdmin] != 1342)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                    return 1;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        if(JogadorInfo[playa][pSex] == 1)
                        {
                            SetPlayerSkin(playa, 42);
                        }
                        else
                        {
                            SetPlayerSkin(playa, 69);
                        }
                        SetPlayerSkin(playa, 268);
                        if(JogadorInfo[playa][pSex] == 2) {  SetPlayerSkin(playa, 69); }
                        if(JogadorInfo[playa][pSocio] >= 1) {  SetPlayerSkin(playa, 42); }
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        ResetPlayerWeaponsEx(playa);
                        WantedPoints[playa] = 0;
                        JogadorInfo[playa][pJailed] = 3;
                        JogadorInfo[playa][pJailTime] = money*60;
                        SetPlayerInterior(playa, 0);
                        SetPlayerPos(playa, 1175.5886,-1182.0431,87.0254);
                        format(string, sizeof(string), "ADMNCMD: %s Colocou %s por [%d] minutos na cadeia. Motivo: %s", PlayerName(playerid), giveplayer,money,(result));
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        format(string, sizeof(string), "* Voзк prendeu %s,Motivo: %s.", giveplayer,(result));
                        SendClientMessage(playerid, COLOR_LIGHTRED, string);
                        if(admtrabalhando[playerid] < 1 && admhide[playerid] == 1)
                        {
                            format(string, sizeof(string), "* Vocк foi preso por [%d] minutos por algum Administrador.", money);
                            SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                        }
                        else
                        {
                            format(string, sizeof(string), "* Vocк foi preso por [%d] minutos por %s.", money,sendername);
                            SendClientMessage(playa, COLOR_LIGHTBLUE, string);
                        }
                        SetPlayerChatBubble(playa, ".", COLOR_RED, 1, 1);
                        return 1;
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)