[Ajuda] /explodir - 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: [Ajuda] /explodir (
/showthread.php?tid=505026)
/explodir -
HHwilliamHH - 06.04.2014
eu do /explodir nick ou id e sу explodi o id 1 e 2 nao explodi os outros. me ajuda ae
Код HTML:
if(strcmp(cmd, "/explodir", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /explodir [playerid]");
return 1;
}
new Jogador;
Jogador = strval(tmp);
new Float:burnx, Float:burny, Float:burnz;
GetPlayerPos(Jogador,burnx, burny, burnz);
CreateExplosion(burnx, burny , burnz + 3, 1, 3);
GetPlayerName(Jogador, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmCmd: %s explodiu %s.",PlayerName(playerid), PlayerName(Jogador));
ABroadCast(COLOR_LIGHTRED,string,1);
}
else
{
SendClientMessage(playerid,COLOR_GRAD5,"Vocк nгo tem permissгo para usar esse comando!");
}
return 1;
}
Re: /explodir -
jpmdik - 08.04.2014
Код:
if(strcmp(cmd, "/explodir", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /explodir [playerid]");
return 1;
}
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "AdmCmd: %s explodiu %s.",giveplayer, sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
SetPlayerHealth(giveplayerid, 10);
new Float:boomx, Float:boomy, Float:boomz;
GetPlayerPos(giveplayerid,boomx, boomy, boomz);
CreateExplosion(boomx, boomy , boomz, 7, 10);
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD5,"Vocк nгo tem permissгo para usar esse comando!");
}
return 1;
}
Espero ter ajudado