15.08.2011, 06:46
Hello,
I cannot script really great and I really want to know this:
Whats params? Whats Playerid? Whats CMD
What does this mean? There's [50], [128], [MAX_PLAYER_NAME], are they suppose to be values?
I get a error, it says I haven't got pAdminLevel defined
What is this? sscanf "uz" id and reason
Whats ID and playerid? I don't get it.
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!
I cannot script really great and I really want to know this:
Quote:
CMD:ban(playerid, params[]) |
Quote:
new id, reason[50], string[128], banned[MAX_PLAYER_NAME]; |
Quote:
if(PlayerInfo[playerid][pAdminLevel] >= 5 || !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not allowed to use this command!"); |
Quote:
if(sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [ID] [Reason]"); |
Quote:
if(playerid == id) return SendClientMessage(playerid,COLOR_RED, "You cannot kick yourself"); |
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 format?
whats SendClientMessageToAll?
Whats BanEx? What will it exactly do to the values
It's not a god damn tutorial!