No, not all have this structure, and i like my code style, why i should change lol.
pawn Код:
CMD:goto(playerid, params[])
{
if(pInfo[playerid][Logged] == 0) return SCM(playerid,0x0080C0FF,"Please login before using this command.");
if (pInfo[playerid][Admin] >= 1)
{
new targetid, string[128];
if(sscanf(params, "u", targetid)) return SCM(playerid, -1, "{F70505}Usage: {FFFFFF}/goto [PlayerID]");
if(targetid == INVALID_PLAYER_ID) return SCM(playerid, COLOR_ORANGE, "Enter a valid player ID/name!");
if(GetPVarInt(playerid,"CmdTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait before using this command again.");
else
{
new pName[24];
GetPlayerName(targetid,pName,128);
new aName[24];
GetPlayerName(playerid,aName,128);
format(string, sizeof(string), "You succesfully teleported to %s [%d]",pName,targetid);
SCM(playerid,0xFF0000FF,string);
SetPlayerInterior(playerid,GetPlayerInterior(targetid));
new Float:TeleX, Float:TeleY, Float:TeleZ;
GetPlayerPos(targetid, TeleX, TeleY, TeleZ);
SetPlayerPosEx(playerid, TeleX, TeleY, TeleZ);
new msg[128];
format(msg, sizeof(msg), "0,4** Admin %s (%d) teleported to %s (%d)", aName,playerid, pName, targetid);
IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
SetPVarInt(playerid,"CmdTime",GetTickCount()+2000);
pInfo[targetid][AdminActions]++;
return true;
}
}
else return 0;
}
CMD:drop(playerid, params[])
{
if(pInfo[playerid][Logged] == 0) return SCM(playerid,0x0080C0FF,"Please login before using this command.");
if (pInfo[playerid][Admin] >= 1)
{
new pid;
if(sscanf(params, "u", pid)) return SCM(playerid, -1, "{F70505}Usage: {FFFFFF}/drop [PlayerID]");
if(!IsPlayerConnected(pid)) return SCM(playerid, red, "ERROR: That player is not online.");
if(pid == playerid) return SCM(playerid, COLOR_RED, "You can't drop yourself.");
if(GetPVarInt(playerid,"CmdTime")>GetTickCount())return SCM(playerid,0xFF0000FF,"Please wait before using this command again.");
new Float:x;
new Float:y;
new Float:z;
new msg[250];
new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[250];
GetPlayerName(pid, paramname, sizeof(paramname));
GetPlayerName(playerid, adminname, sizeof(adminname));
GetPlayerPos(pid,x,y,z);
SetPlayerPosEx(pid,x,y,z+20);
format(string, sizeof(string), "** Admin %s (%d) dropped %s (%d)", adminname,playerid, paramname, pid);
SendMessageToAdmins(0xFF0000FF, string);
SetPVarInt(playerid,"CmdTime",GetTickCount()+2000);
pInfo[pid][AdminActions]++;
format(msg, sizeof(msg), "0,4** Admin %s (%d) dropped %s (%d)", adminname,playerid, paramname, pid);
IRC_GroupSay(gGroupID, IRC_ACHANNEL, msg);
IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
}
else SCM(playerid, red, "Unknown command.");
return 1;
}
CMD:mute(playerid, params[])
{
if(pInfo[playerid][Logged] == 0) return SCM(playerid,0x0080C0FF,"Please login before using this command.");
if (pInfo[playerid][Admin] >= 1)
{
new pid;
new msg[128];
if(sscanf(params, "us", pid, params[2])) return SCM(playerid, -1, "{F70505}Usage: {FFFFFF}/mute [playerid] [reason]");
if(pInfo[pid][Muted] == 1) return SCM(playerid,0xFF0000FF,"This player is already muted.");
if(pid == playerid) return SCM(playerid, COLOR_RED, "You can't mute yourself.");
if(!IsPlayerConnected(pid)) return SCM(playerid, red, "ERROR: That player is not online.");
new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
GetPlayerName(pid, paramname, sizeof(paramname));
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "** Admin %s (%d) muted %s (%d) - (%s)", adminname,playerid, paramname, pid, params[2]);
SCMTA(0xFF0000FF, string);
pInfo[pid][Muted] = 1;
pInfo[pid][AdminActions]++;
format(msg, sizeof(msg), "0,4** Admin %s (%d) muted %s (%d) - (%s)", adminname,playerid, paramname, pid, params[2]);
IRC_GroupSay(gGroupID, IRC_ACHANNEL, msg);
IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
}
else SCM(playerid, red, "Unknown command.");
return 1;
}