[Tutorial] How to script some important admin commands.
#8

Hello,

I cannot script really great and I really want to know this:

Quote:

CMD:ban(playerid, params[])

Whats params? Whats Playerid? Whats CMD

Quote:

new id, reason[50], string[128], banned[MAX_PLAYER_NAME];

What does this mean? There's [50], [128], [MAX_PLAYER_NAME], are they suppose to be values?

Quote:

if(PlayerInfo[playerid][pAdminLevel] >= 5 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command!");

I get a error, it says I haven't got pAdminLevel defined

Quote:

if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [ID] [Reason]");

What is this? sscanf "uz" id and reason

Quote:

if(playerid == id) return SendClientMessage(playerid,COLOR_RED, "You cannot kick yourself");

Whats ID and playerid? I don't get it.

Quote:

GetPlayerName(id, banned, sizeof(banned));
format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, GetName(playerid), reason);
SendClientMessageToAll(COLOR_RED, string);
BanEx(id, reason);

Whats GetPlayerName, there's many stuff like 'sizeof'

Whats format?

whats SendClientMessageToAll?

Whats BanEx? What will it exactly do to the values


It's not a god damn tutorial!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)