19.07.2013, 18:29
Setup a boolean variable, or an integer if you want, and put it in your enum. let's say like this:
and when the player recieves a ticket
;
Make sure to write it and save it in his Userfile.
Now, the next time he logs in:
pawn Код:
enum PlayerInfo
{
// .....
// more code
// ....
bool:HasTicket
}
new pInfo[playerid][PlayerInfo];
pawn Код:
pInfo[playerid][HasTicket] = true;
// more code
// When the player PAYS for the ticket:
pInfo[playerid][HasTicket] = false;
Make sure to write it and save it in his Userfile.
Now, the next time he logs in:
pawn Код:
// This is under OnPlayerSpawn
if(pInfo[playerid][HasTicket] == true)
{
// Do code here to automatically put him in Jail
}