But The Only Varible I have is pTazed which is nothing to do with admin system
Dont worry, I'll edit the code that I'm given and I'll post any errors that I get
pawn Код:
CMD:adminchat(playerid, o[])
{
if(isnull(o)) return SendClientMessage(playerid, -1,"Syntax Error: /adminchat [text]");
new name[ MAX_PLAYER_NAME ], str[128];
GetPlayerName(playerid, name, sizeof(name));
format(str,sizeof(str),"[Admin Chat] %s: %s", name, o);
SendClientMessageToAll(-1, str);
return true;
}
CMD:kick(playerid, o[])
{
new id, reason[35], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], str[128];
if(sscanf(o,"us[35]", id, reason)) return SendClientMessage(playerid, -1,"Syntax Error: /kick [PlayerName/ID] [Reason]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1,"This player is offline");
GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(id, name2, sizeof(name2));
format(str,sizeof(str),"|- %s has been kicked by %s. Reason:(%s) -|", name2, name, reason);
SendClientMessageToAll(-1, str);
Kick(id);
return true;
}
YCMD:ban(playerid, o[])
{
new id, reason[35], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], str[128];
if(sscanf(o,"us[35]", id, reason)) return SCM(playerid, -1,"Syntax Error: /ban [PlayerName/ID] [Reason]");
if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, -1,"This player is offline");
GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(id, name2, sizeof(name2));
format(str,sizeof(str),"|- %s has been banned by %s. Reason:(%s)", name2, name, reason);
SendClientMessageToAll(-1, str);
Ban(id);
return true;
}
YCMD:ajail(playerid, o[])
{
new id, reason[35], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], str[128];
if(sscanf(o,"us[35]", id, reason)) return SCM(playerid, -1,"Syntax Error: /ajail [PlayerName/ID] [Reason]");
if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, -1,"This player is offline");
GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(id, name2, sizeof(name2));
format(str,sizeof(str),"|- %s has been jailed by %s. Reason:(%s)", name2, name, reason);
SendClientMessageToAll(-1, str);
SetPlayerPos(playerid, ...); // Now set his pos to jail.
return true;
}