Police radar
#1

So I have police radar and my question is how to make when player get ticket radar for speed then when someone player goes offline and come back to server if he have a radar ticket then he go to jail how to make that if you know what I mean? Thanks
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)