SA-MP Forums Archive
[Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! - 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: [Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! (/showthread.php?tid=140299)



[Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! - Thrarod - 08.04.2010

Easy, use SetPlayerSpecialAction!

pawn Code:
if(strcmp("/smoke", cmd, true) == 0)
    {
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        GivePlayerMoney(playerid, -2);
        return 1;
    }
Tada!!! When you write /smoke it takes 2 money and gives a cig, comment ( // ) GivePlayerMoney part if you want cigs to be free or just delete it, also search the wiki for more info about SetPlayerSpecialAction

I was really bored and people playing my server asks how I get cigs with a command


Re: [Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! - Steven82 - 08.04.2010

Hey this is very simple is that why it called,


Code:
Tuts4Nubs
LOlz


Re: [Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! - Thrarod - 08.04.2010

I am bored
And there are people askin that really xD


Re: [Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! - Steven82 - 08.04.2010

hahah lol, i made rodney level 23


Re: [Tuts4Nubs]I wants a cig in ma hand when I writes /smoke!!! - Thrarod - 08.04.2010

Thx xD