[Ajuda] /desbugar
#1

alguem pode mim ajuda pq eu dou /desbugar em um player que e desbugado sou eu alguem pode dizer oque ta errado aki?

Код:
if(strcmp(cmd, "/desbugar", true) == 0)
	{
		if(pAdmin[playerid] > 0 || Helper[playerid] == 1)
		{
			new plid;

			if(sscanf(cmdtext, "s[10]u", cmd, plid))
			{
				SendClientMessage(playerid, Vermelho, "Digite: /desbugar [id]");
				return 1;
			}
			if(IsPlayerConnected(plid))
			{
				format(string, sizeof(string), "O(A) Administrador %s (%d) desbugou o player: %s (%d)!", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(plid), plid);
				SpawnPlayer(playerid);
				SendClientMessageToAll(tcadm, string);
			}
			else
			{
				SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
			}
		}
		return 1;
	}
Reply
#2

SpawnPlayer(playerid); troque por SpawnPlayer(plid);
Reply
#3

pawn Код:
if(strcmp(cmd, "/desbugar", true) == 0)
    {
        if(pAdmin[playerid] > 0 || Helper[playerid] == 1)
        {
            new plid;

            if(sscanf(cmdtext, "s[10]u", cmd, plid))
            {
                SendClientMessage(playerid, Vermelho, "Digite: /desbugar [id]");
                return 1;
            }
            if(IsPlayerConnected(plid))
            {
                format(string, sizeof(string), "O(A) Administrador %s (%d) desbugou o player: %s (%d)!", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(plid), plid);
                SpawnPlayer(plid);
                SendClientMessageToAll(tcadm, string);
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
            }
        }
        return 1;
    }
Reply
#4

Mais simples para economizar linhas...
pawn Код:
if(strcmp(cmd, "/desbugar", true) == 0)
{
    new plid;
    if(pAdmin[playerid] > 0 || Helper[playerid] == 1)return SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
    if(sscanf(cmdtext, "s[10]u", cmd, plid)) return SendClientMessage(playerid, Vermelho, "Digite: /desbugar [id]");
    if(IsPlayerConnected(plid)) return SendClientMessage(playerid, Vermelho, "Usuario Offline.");

    format(string, sizeof(string), "O(A) Administrador %s (%d) desbugou o player: %s (%d)!", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(plid), plid);
    SendClientMessageToAll(tcadm, string);
    SpawnPlayer(plid);
    return 1;
}
Reply
#5

EU USO ESTI Й BOM MAS NAO DESBUGA NINGUEM DE INTERIOR SE QUISER USALO

PHP код:
    if(strcmp(cmd"/desbugar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USO: /desbugar [id]");
                return 
1;
            }
            new 
para1;
            
para1 strval(tmp);
            
tmp strtok(cmdtextidx);
            if (
PlayerInfo[playerid][pAdmin] >= 1)
            {
            new 
Float:slx 0.000000Float:sly 0.000000Float:slz 0.000000Float:Pa 0.000000;
            
GetPlayerPos(para1slxslyslz);//PEGA POS
            
GetPlayerFacingAngle(para1Pa);//PEGA ANGULO
            
RemovePlayerFromVehicle(para1);//REMOVE VEICULO SE ESTIVE
            
SetPlayerPos(para1slxslyslz+3);//JOGA PLAYER AO ALTO PARA DESBUGAR (NAO MATA)
            
TogglePlayerControllable(para1,1);//SE TIVE CONGELADO DESONGLEA
            
SetPlayerInterior(playerid0);//SETA INTERIOR PRA ZERO
            
SetPlayerHealth(playerid,100);//SETA VIDA 100
            
PlayerInfo[playerid][pMuted] = 0;//SE TIVER MUTADO EL TIRA
            
{
            
SendClientMessage(playeridCOLOR_GRAD1"   Desbugado Com sucesso!");
            }
            
ABroadcast(COLOR_LIGHTRED,string,1);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Voce nao tem permissao para usar esse comando!");
            }
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)