20.02.2011, 14:58
I've just made a simple /myweps command, which will get the player's weapon's, their name, and ammo, and return each one like:
Weapon: M4 Ammo: 29
But the compiler stops work anyone know why?
Weapon: M4 Ammo: 29
But the compiler stops work anyone know why?
pawn Код:
COMMAND:myweapons(playerid, params[])
{
new weapons[13][2], string[150];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
GetWeaponName(playerid,weapons,sizeof(weapons));
format(string,sizeof(string),"Weapon Name: %s Ammo: %d", weapons[i][0], weapons[i][1]);
SendClientMessage(playerid, COLOR_GREY,string);
return 1;
}