Also ich könnt dir was zum /explode geben aber hab da drinne das es für admins is.. kannste ja evtl. abändern..
if(strcmp(cmd, "/explode", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GREY, "/explode [ID]");
return 1;
}
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "AdmCmd: %s ist durch %s explodiert",giveplayer, sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
//SendClientMessageToAll(COLOR_DBLUE, string);
SetPlayerHealth(giveplayerid, 10);
new Float:boomx, Float:boomy, Float:boomz;
GetPlayerPos(giveplayerid,boomx, boomy, boomz);
CreateExplosion(boomx, boomy , boomz, 7, 10);
new PlayerName[30];
GetPlayerName(playerid, PlayerName, 30);
printf("[Command] %s hat /explode verwendet um %s explodieren zu lassen", PlayerName, giveplayer);
}
else
{
format(string, sizeof(string), "%d ist kein aktiver Spieler.", giveplayerid);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Sie sind nicht befugt, dieses Kommando zu verwenden!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Sie müssen sich einloggen um dieses Kommando zu verwenden!");
}
return 1; }