26.04.2014, 16:57
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;
}