SA-MP Forums Archive
[FINE COMMAND] Needing a hand. - 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)
+--- Thread: [FINE COMMAND] Needing a hand. (/showthread.php?tid=586605)



[FINE COMMAND] Needing a hand. - BarFix - 23.08.2015

Anyone up for lending i hand? my /fine command is broke.. anyone got one they can give me? im not pasting code because for some reason its messed:/

needed...

/fine [id] [amount] [reason]
and for zCMD


AW: [FINE COMMAND] Needing a hand. - MrGtasagamer - 23.08.2015

Quote:
Originally Posted by BarFix
Посмотреть сообщение
Anyone up for lending i hand? my /fine command is broke.. anyone got one they can give me? im not pasting code because for some reason its messed:/

needed...

/fine [id] [amount] [reason]
and for zCMD
Hey,
this should work.
https://sampforum.blast.hk/showthread.php?tid=158674


Re: AW: [FINE COMMAND] Needing a hand. - BarFix - 23.08.2015

Quote:
Originally Posted by MrGtasagamer
Посмотреть сообщение
Nope.. thanks for trying.


Re: [FINE COMMAND] Needing a hand. - jlalt - 23.08.2015

what you want to /fine do ._.?


Re: [FINE COMMAND] Needing a hand. - BarFix - 23.08.2015

Quote:
Originally Posted by jlalt
Посмотреть сообщение
what you want to /fine do ._.?
Admin command to take money from a player...
rule breaking etc.


Re: [FINE COMMAND] Needing a hand. - Roberto80 - 23.08.2015

Код:
CMD:fine(playerid,params[])
{
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"[Error]: You Are Not An Admin!");
	new id,amount,reason[30],str[128],name[24],name2[24];
	if(sscanf(params,"uis",id,amount,reason)) return SendClientMessage(playerid,-1,"[Usage]: /fine < ID > < Amount > < Reason >");
	if(id == playerid) return SendClientMessage(playerid,-1,"[Error]: You Can't Fine Yourself!");
	if(amount > GetPlayerMoney(id)) return SendClientMessage(playerid,-1,"[Error]: This Player Don't Have That Money!");
	GetPlayerName(playerid,name,24);
	GetPlayerName(id,name2,24);
	GivePlayerMoney(id,GetPlayerMoney(id)-amount);
	format(str,128,"*Admin %s(%i) Has Fined %i From %s(%i), Reason:%s!",name,playerid,amount,name2,id,reason);
	SendClientMessageToAll(-1,str);
	return 1;
}
haven't tested but must work ,enjoy


Re: [FINE COMMAND] Needing a hand. - BarFix - 23.08.2015

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
Код:
CMD:fine(playerid,params[])
{
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"[Error]: You Are Not An Admin!");
	new id,amount,reason[30],str[128],name[24],name2[24];
	if(sscanf(params,"uis",id,amount,reason)) return SendClientMessage(playerid,-1,"[Usage]: /fine < ID > < Amount > < Reason >");
	if(id == playerid) return SendClientMessage(playerid,-1,"[Error]: You Can't Fine Yourself!");
	if(amount > GetPlayerMoney(id)) return SendClientMessage(playerid,-1,"[Error]: This Player Don't Have That Money!");
	GetPlayerName(playerid,name,24);
	GetPlayerName(id,name2,24);
	GivePlayerMoney(id,GetPlayerMoney(id)-amount);
	format(str,128,"*Admin %s(%i) Has Fined %i From %s(%i), Reason:%s!",name,playerid,amount,name2,id,reason);
	SendClientMessageToAll(-1,str);
	return 1;
}
haven't tested but must work ,enjoy
Thank you.