08.01.2011, 20:16
Код:
dcmd_contract(playerid, params[]) { new targetid; new reasonid; if(sscanf(params, "uzi", targetid, reasonid, money)) return SendClientMessage(playerid, COLOR_RED, "Usage: /contract [ID] [Reason] [Reward]"); if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED, "Error: Player is not connected."); SendClientMessage(targetid, COLOR_RED, "Somebody has placed an contract on you!"); GivePlayerMoney(playerid, -money); return 1; }
What needs top happen?
If you type /contract [ID] [Reason] [Reward]
You lose the cash u typed in by REWARD.
The id gets 6 wanted stars.
The id gets the message: [NAME] has place an contract on you. Reason: [The reason here] <-- Who can do this?
And if the id gets killed by someone, he gets the reward cash.