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;
}