[HELP] /Fine
#1

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
Reply
#2

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!
Reply
#3

Anycommandshitfuxx lol what isnt that example like this if(strcmp(cmd, "/fine", true) ==0 || strcmp(cmd, "/f", true) ==0)
{
Reply
#4

Use dcmd or zcmd
Reply
#5

under what should ill put these?
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)