16.09.2014, 11:30
Hey there, i'm willing to make a /split command to split ammo to other players, this is what i've did so far, but i', just not able to continue as i dont know what ill be doing, can anyone help me out?
Код:
CMD:split(playerid, params[]) { new playerb, gunid, ammo, string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(sscanf(params, "uii", playerb, ammo)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /split [playerid] [ammo]"); return 1; } if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id."); GiveZaiatWeapon(playerb, ammo); format(string, sizeof(string), " You have given %s %d ammo.", RPN(playerb), ammo); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), " %s has given you %d ammo.", RPN(playerid), ammo); SendClientMessage(playerb, COLOR_WHITE, string); return 1; }