All pastes #939744 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-12 15:21 UTC
rendered paste body
new target = 0; // The playerID you want to know the weapons off
new user = 0; // The PlayerID you want to show the weapons to
new color = 0xf000000; // The color of the messages

if(IsPlayerConnected(target)){
  new weapon, ammo, string[256], name[256];

  GetPlayerName(target, name, sizeof(name));
  format(string, sizeof(string), "%s currently has these weapons:", name);
  SendClientMessage(user, color, string);

  for (new i = 0; i < 13; i++) {
    GetPlayerWeaponData(playerid, i, weapon, ammo);

    format(string, sizeof(string), "Weapon %s with ammo %f", weapon, ammo);
    SendClientMessage(user, color, string);
  }
}