/desbugar -
Netiinho - 26.04.2014
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;
}
Re: /desbugar -
AndreOliveira - 26.04.2014
SpawnPlayer(playerid); troque por SpawnPlayer(plid);
Re: /desbugar -
DownGrade - 26.04.2014
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;
}
Re: /desbugar -
Caio_Freeze - 26.04.2014
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;
}
Re: /desbugar -
rogerioexper - 26.04.2014
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(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /desbugar [id]");
return 1;
}
new para1;
para1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new Float:slx = 0.000000, Float:sly = 0.000000, Float:slz = 0.000000, Float:Pa = 0.000000;
GetPlayerPos(para1, slx, sly, slz);//PEGA POS
GetPlayerFacingAngle(para1, Pa);//PEGA ANGULO
RemovePlayerFromVehicle(para1);//REMOVE VEICULO SE ESTIVE
SetPlayerPos(para1, slx, sly, slz+3);//JOGA PLAYER AO ALTO PARA DESBUGAR (NAO MATA)
TogglePlayerControllable(para1,1);//SE TIVE CONGELADO DESONGLEA
SetPlayerInterior(playerid, 0);//SETA INTERIOR PRA ZERO
SetPlayerHealth(playerid,100);//SETA VIDA 100
PlayerInfo[playerid][pMuted] = 0;//SE TIVER MUTADO EL TIRA
{
SendClientMessage(playerid, COLOR_GRAD1, " Desbugado Com sucesso!");
}
ABroadcast(COLOR_LIGHTRED,string,1);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nao tem permissao para usar esse comando!");
}
}
return 1;
}