21.04.2012, 14:24
This is pretty damn interesting, dude. Great work. I'm considering using this in my next gamemode especially since sscanf2 is fucking me over. However, does this support optional parameters?
Changelog
|
rcmd[]->infernus(playerid, succes)
{
//code shitty here
return 1;
}
rcmd[]->inf(playerid, succes)
{
return rcmd_infernus(playerid, success, .......);
}
rcmd[]->infernus(playerid) {
// Code here
return 1;
}
rcmd[]->inf(playerid) {
return cmd_infernus(playerid);
}
rcmd[us]->ban(playerid, success, user, reason[]) {
if(!success) {
return SendClientMessagee(playerid, 0xFF0000FF, "<!> /ban [player id/name] [reason]");
}
if(IsPlayerConnected(user)) {
BanEx(user, reason);
} else {
return SendClientMessage(playerid, 0xFF0000FF, "<!> Player not connected!");
}
return 1;
}
rcmd[us]->othername(playerid, success, user, reason[]) {
return cmd_ban(playerid, success, user, reason);
}