10.04.2016, 23:04
I have this command /checkg which shows you a player's weapons if he has one.
This is the command.
Now it works just fine, but I don't want it to show the messages under each other.
So let's say that the player has a deagle in his first slot and an m4 in his second slots.
This command should display this.
So instead of under each other, next to each other.
This is the command.
Код:
CMD:checkg(playerid, params[]) { if(playerVariables[playerid][pAdminLevel] > 0) { new id, weapons[13][2], string[256], count; if(sscanf(params, "r", id)) return SendClientMessage(playerid, COLOR_GRAD2, "Usage: {FFFFFF}/checkg [playerid]"); SCM(playerid, -1, "----- Weapon Data -----"); for (new i = 0; i < 13; i++) { GetPlayerWeaponData(id, i, weapons[i][0], weapons[i][1]); if(weapons[i][0] > 0) { format(string, sizeof(string), "(%d) %s - %d", i, WeaponNames[weapons[i][0]], weapons[i][1]); SCM(playerid, COLOR_ORANGERED, string); count++; } } if(count == 0) { SCM(playerid, COLOR_ORANGERED, "* No data available."); } SCM(playerid, -1, "-------------------"); } else return SendClientMessage(playerid, -1, AdminOnly); return 1; }
So let's say that the player has a deagle in his first slot and an m4 in his second slots.
This command should display this.
Код:
/checkg: Deagle (30 bullets), M4 (40 bullets)