22.04.2010, 15:52
pawn Код:
new license[MAX_PLAYERS];
pawn Код:
dini_IntSet(file,"license", license[playerid]);
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(license[playerid] == 0)
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOUR_RED,"You don't have a license");
return 1;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER)
{
if(license[playerid] == 0)
{
RemovePlayerFromVehicle(playerid);
return 1;
}
else
{
return 1;
}
}
return 1;
}
pawn Код:
license[playerid] = dini_Int(file,"license");
pawn Код:
dini_IntSet(file,"license", 0);
when I do the command is that:
1. "You don't have a license" still are there when you enter a vehicle
2. It works until you log out. It won't work if you log in.
So all in all, it works, but it wont save, and the error won't go away.
Thanks in advance