• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Command does not work in-game
#1
Hello, i made a simple /explode <playername/playerid> <explosion type> command.
I dont get any compile errors, but the explosion type does not work in-game, so i can not explode other player with different explosion types... i dont understand why.

Quote:CMD:explode(playerid, params[])
{
new string[128], bombid, Float:x, Float:y, Float:z, Float:type;
if(sscanf(params, "ui", bombid, type)) SendClientMessage(playerid, 0xff0004AA, "Usage: /explode <playername/playerid> <explosion type>");
else if(!IsPlayerConnected(bombid)) SendClientMessage(playerid, 0xff0004AA, "ERROR: This player is not connected.");
else
{
new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], id;
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
GetPlayerName(id, targetname, MAX_PLAYER_NAME);
GetPlayerPos(bombid, x, y, z);
CreateExplosion(x, y, z, bombid, 10.00);
format(string, 128, "* You have exploded %s (ID:%d)", name, playerid);
SendClientMessage(playerid, 0x43ff0fAA, string);
format(string, 128, "* %s (ID:%d) exploded %s (ID:%d) with explosion type %i", name, playerid, targetname, id, type);
SendClientMessageToAll(0xffea00AA, string);

}
return 1;
}
  Reply


Messages In This Thread
Command does not work in-game - by PANZEHIR_ - 5 hours ago

Forum Jump: