21.05.2009, 09:59
Hello,
I have created a command with me friend, but it dont works on another player,
I type /explode 1 ( 0 = my id ) and then get i a explode.. >.<
Sorry for bad English >.<
I have created a command with me friend, but it dont works on another player,
I type /explode 1 ( 0 = my id ) and then get i a explode.. >.<
Sorry for bad English >.<
Quote:
Here is the script. if(strcmp(cmd, "/explode", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "Use: /explode [PlayerID/PlayerNickName]"); return 1; } new playa; new Float,Float:y,Float:z; if(IsPlayerAdmin(playerid)) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerPos(playa, x, y, z); if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 104) printf("AdmCmd: %s exploded %s",sendername, giveplayer); format(string, sizeof(string), "AdmCmd: %s was been Exploded by %s",giveplayer ,sendername); SendClientMessageToAll(COLOR_RED, string); CreateExplosion(x, y, z, 10, 30); CreateExplosion(x + 1, y, z, 10, 30); CreateExplosion(x + 1, y + 1, z, 10, 30); CreateExplosion(x, y + 1, z, 10, 30); CreateExplosion(x - 1, y, z, 10, 30); CreateExplosion(x, y - 1, z, 10, 30); CreateExplosion(x - 1, y - 1, z, 10, 30); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "The player is off!"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, "You don't are Admin!"); return 1; } } SendClientMessage(playerid, COLOR_GREY, "The Player is off!"); return 1; } |