[HELP] /Fine - 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: [HELP] /Fine (
/showthread.php?tid=178598)
[HELP] /Fine -
Karl1195 - 22.09.2010
Hey can some one help me that admin lvl 1+ can do /fine ammount please. I know it's easy but i am still new to scripting i just understand i can't write it from the start ;/.
I will be looking forward to learn how to do /fine thanks.
Karl1195
Re: [HELP] /Fine -
Cameltoe - 22.09.2010
Make an stock, this makes things a little easier for you.
You may make an define instead of this stock as defines are slightly more rapid then stocks.
anyway:
Start off by making an stock like this:
pawn Код:
stock GiveFine(playerid, fineamount)
{
GivePlayerMoney(playerid, GetPlayerMoney(playerid)-fineamount);
SendClientMessage(playerid, "You were fined!");
}
Now in an command do like this:
pawn Код:
Anycommandshitfuxx(playerid, params[])
{
new uID,amount;
if(sscanf(params, "ui", uID,amount) return SendClientMessage(playerid, COLOR, "Usage: /fine playerid / name");
GiveFine(uID, amount);
}
Not tested.. but should work just fine!
Re: [HELP] /Fine -
Karl1195 - 22.09.2010
Anycommandshitfuxx
lol what isnt that example like this if(strcmp(cmd, "/fine", true) ==0 || strcmp(cmd, "/f", true) ==0)
{
Re: [HELP] /Fine -
Cameltoe - 22.09.2010
Use dcmd or zcmd
Re: [HELP] /Fine -
Karl1195 - 22.09.2010
under what should ill put these?
Re: [HELP] /Fine -
Cameltoe - 22.09.2010
the actual stock anywhere in your script but under the includes, you might want to put it under all the callbacks too.
And the command, depends on what command processing you choosed.