Frisk command
#7

Try this:

pawn Код:
new eWeaponNames[][32] =
{
    {"Unarmed"}, {"Brass Knuckles"}, {"Golf Club"}, {"Night Stick"}, {"Knife"}, {"Baseball Bat"}, {"Shovel"}, {"Pool Cue"}, {"Katana"}, {"Chainsaw"},
    {"Purple Dildo"}, {"Big White Vibrator"}, {"Medium White Vibrator"}, {"Small White Vibrator"}, {"Flowers"}, {"Cane"}, {"Grenade"}, {"Teargas"}, {"Molotov"},
    {" "}, {" "}, {" "}, {"Colt 45"}, {"Colt 45 (Silenced)"}, {"Desert Eagle"}, {"Normal Shotgun"}, {"Sawnoff Shotgun"}, {"Combat Shotgun"}, {"Micro Uzi (Mac 10)"},
    {"MP5"}, {"AK47"}, {"M4"}, {"Tec9"}, {"Country Rifle"}, {"Sniper Rifle"}, {"Rocket Launcher"}, {"Heat-Seeking Rocket Launcher"}, {"Flamethrower"}, {"Minigun"},
    {"Satchel Charge"}, {"Detonator"}, {"Spray Can"}, {"Fire Extinguisher"}, {"Camera"}, {"Night Vision Goggles"}, {"Infrared Vision Goggles"}, {"Parachute"}, {"Fake Pistol"}
};

CMD:frisk(playerid, params[])
{
    new
        iID
    ;
   
    if(sscanf(params, "u", iID))
        return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /frisk [nick/id]"), 1;
    if(iID == INVALID_PLAYER_ID)
        return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid nickname/ID specified."), 1;
   
    new
        weaponData[13][2],
        szString[128],
        szName[MAX_PLAYER_NAME]
    ;
   
    GetPlayerName(iID, szName, sizeof(szName));
   
    format(szString, sizeof(szString), "* %s's weapon information:", szName);
    SendClientMessage(playerid, COLOR_YELLOW, szString);
    SendClientMessage(playerid, COLOR_YELLOW, " ");
       
    for(new i = 0; i < 13; i++)
    {
        GetPlayerWeaponData(iID, i, weaponData[i][0], weaponData[i][1]);
       
        format(szString, sizeof(szString), "- Slot ID: %d   Weapon ID: %s   Ammo: %d", i, eWeaponNames[weaponData[i][0]], weaponData[i][1]);
        SendClientMessage(playerid, COLOR_YELLOW, szString);
    }
    return 1;
}
Reply


Messages In This Thread
Frisk command - by zT KiNgKoNg - 19.03.2013, 19:39
Re: Frisk command - by Jstylezzz - 19.03.2013, 19:42
Re: Frisk command - by zT KiNgKoNg - 19.03.2013, 19:45
Re: Frisk command - by Stanford - 19.03.2013, 19:46
Re: Frisk command - by Scenario - 19.03.2013, 19:47
Re: Frisk command - by zT KiNgKoNg - 19.03.2013, 20:00
Re: Frisk command - by Scenario - 19.03.2013, 20:05
Re: Frisk command - by zT KiNgKoNg - 19.03.2013, 20:13
Re: Frisk command - by Joshman543 - 19.03.2013, 21:02

Forum Jump:


Users browsing this thread: 2 Guest(s)