GetWeaponData help
#2

pawn Код:
CMD:weaps(playerid, params[])
{
    if (!IsPlayerAdmin(playerid)) return 1;

    new
        id;

    if (sscanf(params, "r", id)) return SendClientMessage(playerid, -1, "Usage: /weaps <ID/Part Of Name>");
    if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player");

    new
        weaponid,
        ammo,
        sz_T[32];
       
    GetPlayerName(id, sz_T, MAX_PLAYER_NAME);
    format( sz_T, sizeof (sz_T), "%s's weapons:", sz_T);
    SendClientMessage(playerid, -1, sz_T);

    for (new i; i != 13; ++i)
    {
        GetPlayerWeaponData(id, i, weaponid, ammo);
        format(sz_T, sizeof (sz_T), "weaponid: %d & ammo: %d", weaponid, ammo);
        SendClientMessage(playerid, -1, sz_T);
    }
    return 1;
}
Reply


Messages In This Thread
GetWeaponData help - by Hybris - 22.12.2013, 14:05
Re: GetWeaponData help - by Konstantinos - 22.12.2013, 14:13
Re: GetWeaponData help - by Hybris - 22.12.2013, 15:33
Re: GetWeaponData help - by Konstantinos - 22.12.2013, 15:39
Re: GetWeaponData help - by BlackWolf120 - 22.12.2013, 15:42
Re: GetWeaponData help - by Patrick - 22.12.2013, 15:49
Re: GetWeaponData help - by BlackWolf120 - 22.12.2013, 16:56
Re: GetWeaponData help - by Patrick - 22.12.2013, 17:00
Re: GetWeaponData help - by Hybris - 23.12.2013, 10:15

Forum Jump:


Users browsing this thread: 1 Guest(s)