SA-MP Forums Archive
Need a litle litle help with cmd! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need a litle litle help with cmd! (/showthread.php?tid=216083)



Need a litle litle help with cmd! - ricardo178 - 24.01.2011

Hello guys, i just want to know how to make this that you can choise the weapon you want... If you do /giveweapon playerid weapid

This one only give you deagle

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Give Weapon CMD");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/giveweapon", true) == 0)
    {
        GivePlayerWeapon(playerid, 24, 500);
        SendClientMessage(playerid, 0xFF4444FF "You gave an weapon!");
        return 1;
    }
    return 0;
}



Re: Need a litle litle help with cmd! - ricardo178 - 24.01.2011

This work but not like i want... How should be the code to give me the weap i want?