Police radar
#2

Setup a boolean variable, or an integer if you want, and put it in your enum. let's say like this:
pawn Код:
enum PlayerInfo
{
// .....
// more code
// ....
bool:HasTicket
}
new pInfo[playerid][PlayerInfo];
and when the player recieves a ticket
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
}
Reply


Messages In This Thread
Police radar - by Luca12 - 19.07.2013, 18:10
Re: Police radar - by Elie1996 - 19.07.2013, 18:29

Forum Jump:


Users browsing this thread: 2 Guest(s)