18.10.2011, 04:58
You need to create a variable like
Then when someone executes /loan, Make LoanBy[target] = playerid.
In the /take command, create a loan parameter then check if LoanBy[playerid] is an actual player.
To make it more secure you could also add a LoanTo[MAX_PLAYERS], then when someone offers a Loan, make the LoanTo of that player to the person he offered a loan to. Then check whether the Loan was issued by a player to a player by using LoanTo[LoanBy[playerid]] = playerid in the /loan take command.
pawn Код:
new LoanBy[MAX_PLAYERS];
In the /take command, create a loan parameter then check if LoanBy[playerid] is an actual player.
To make it more secure you could also add a LoanTo[MAX_PLAYERS], then when someone offers a Loan, make the LoanTo of that player to the person he offered a loan to. Then check whether the Loan was issued by a player to a player by using LoanTo[LoanBy[playerid]] = playerid in the /loan take command.