Help - 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 (
/showthread.php?tid=208856)
Help -
DnL - 09.01.2011
I do not out an order for a job
/confession [Nick / ID] [amount of one-99k] - To confess one player, and it was five crimes cancel them.
Can you help me?
Re: Help -
Alex_Valde - 09.01.2011
What? I've only understand that you need some command.
Can you explain a little what this command will do?
Re: Help -
DnL - 09.01.2011
Priest will serve her and when someone drops it serves them five murders
Re: Help -
DnL - 09.01.2011
help me please?
Re: Help -
Alex_Valde - 09.01.2011
Since you didn't tell me how your system works and what exactly you want in command.
I made it very simple.
If you have any question please ask, I'll be glad to help you.
This is the command ( uses ZCMD and sscanf ) :
pawn Код:
COMMAND:confession(playerid, params[])
{
// Here should go your system like if(playerinfo[playerid][isapriest] == 1)
new id,ammount;
if(!sscanf(params,"ud", id, ammount))
{
if(IsPlayerConnected(id))
{
if(ammount >= 1000 || ammount <= 99000)
{
new string[128], name[MAX_PLAYER_NAME], Pname[MAX_PLAYER_NAME];
new Pwanted = GetPlayerWantedLevel(id);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, Pname, sizeof(Pname));
SetPlayerWantedLevel(id, Pwanted - 5);
format(string, sizeof(string), " %s has confessted you his sins.",Pname);
SendClientMessage(playerid, 0xFFFF00FF, string);
format(string, sizeof(string), "Priest %s has heard your sins and you soccessfully made a confession.",name);
SendClientMessage(id, 0xFFFF00FF, string);
GivePlayerMoney(id, -ammount);
}
else return SendClientMessage(playerid, 0xFF0000FF, "Please use ammount between 1000 and 99000");
}
else return SendClientMessage(playerid, 0xFF0000FF, "This player is not online.");
}
else return SendClientMessage(playerid, 0xFFFF00FF,"Usage: /confession [PlayerID] [Ammount]");
return 1;
}