31.07.2015, 11:24
Quote:
And how to made it all players will use it. not just an admin
Код:
CMD:warn(playerid, params[]) { if(pInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, FactColor[10], "You are not authorized to use that command !"); new id, reason[32], String[128]; if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, FactColor[11], "USAGE: /warn [PlayerID/PartOfName][Reason]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FactColor[11], "That player it's not connected !"); format(String, sizeof(String), "Adm Cmd: %s was warned by %s, reason: %s", Name(id), Name(playerid), reason); SendClientMessageToAll(0xA52A2AFF, String); return 1; } |
Just curious as to how it is so hard to remove such simple code, especially when YOU claim it is your own code.
There are also ways to make the code a lot more neater, at the moment it is just a blob of messiness, just trying to help/suggest things for future coding.
Thanks,
CM707