CMD:explodeall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3 && 5)
{
new string[128], Float:x, Float:y, Float:z,explodeall[128];
if(sscanf(params, "uii", explodeall)) SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /explodeall [Reason]");
if(PlayerInfo[playerid][pAdmin] < 1 && 2) return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only Admin +level 3 can use this command.");
{
GetPlayerPos(playerid, x,y,z);
CreateExplosion(x,y,z,12,10.0);
format(string,sizeof(string), "{A82FED}[All Exploded]: {FFFFFF}All players has exploded by An Admin {A82FED}%s(%d){FFFFFF}! Reason: {A82FED}%s{FFFFFF}.",PlayerName(playerid), playerid, params);
SendClientMessageToAll(-1, string); //Output the string to the client.
format(string, sizeof(string), "An Admin %s(%d) has Exploded All players Reason: %s. (/explodeall)!", PlayerName(playerid), playerid, params);
SendToAdmins(COLOR_GREY,string);
}
}
else
SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
return 1;
}
CMD:explodeall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3 && 5)
{
new string[128], Float:x, Float:y, Float:z,explodeall[128];
if(sscanf(params, "uii", explodeall)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /explodeall [Reason]");
if(PlayerInfo[playerid][pAdmin] < 1 && 2) return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only Admin +level 3 can use this command.");
{
GetPlayerPos(playerid, x,y,z);
CreateExplosion(x,y,z,12,10.0);
format(string,sizeof(string), "{A82FED}[All Exploded]: {FFFFFF}All players has exploded by An Admin {A82FED}%s(%d){FFFFFF}! Reason: {A82FED}%s{FFFFFF}.",PlayerName(playerid), playerid, params);
SendClientMessageToAll(-1, string); //Output the string to the client.
format(string, sizeof(string), "An Admin %s(%d) has Exploded All players Reason: %s. (/explodeall)!", PlayerName(playerid), playerid, params);
SendToAdmins(COLOR_GREY,string);
}
}
else
SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
return 1;
}
Try this.
PHP код:
|
CMD:explodeall(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3 && 5)
{
new string[128], Float:x, Float:y, Float:z,explodeall[128];
if(sscanf(params, "s[128]", explodeall)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /explodeall [Reason]");
if(PlayerInfo[playerid][pAdmin] < 1 && 2) return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only Admin +level 3 can use this command.");
{
GetPlayerPos(playerid, x,y,z);
CreateExplosion(x,y,z,12,10.0);
format(string,sizeof(string), "{A82FED}[All Exploded]: {FFFFFF}All players has exploded by An Admin {A82FED}%s(%d){FFFFFF}! Reason: {A82FED}%s{FFFFFF}.",PlayerName(playerid), playerid, explodeall);
SendClientMessageToAll(-1, string); //Output the string to the client.
format(string, sizeof(string), "An Admin %s(%d) has Exploded All players Reason: %s. (/explodeall)!", PlayerName(playerid), playerid, explodeall);
SendToAdmins(COLOR_GREY,string);
}
}
else
SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Wrong command!! {FF0000}Check availables commands from here `{FFFFFF}/cmds{FF0000}`.");
return 1;
}
no... just no... go away from this section..... :huge_face_palm:
op: next time don't copy and paste a function, thinking it will work because you changed a string. |
Exause me? I'm not copying & Paste anything I just helping him to fixed his problem. but Why Should I go? and go away of this section? I'm here to helping people too from a problems/errors. BTW I'm not changing anything I just adding `return` into it. anyway Thank you for your words.
|