Bug/Error saving system
#1

Hi everybody,
I have a license system that records have been.
Codes:
Код:
(Save license)dUserSetINT(PlayerName(playerid)).("license",license[playerid]); //onplayerdisconnect
Код:
dcmd_login(playerid,params[]) {
  if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"<!> Already login");
  if (strlen(params)==0) return SystemMsg(playerid,"<!> uSe: /login <pw>");
  if (udb_CheckLogin(PlayerName(playerid),params)) {
   login[playerid]=1;
   license[playerid] = dUserINT(PlayerName(playerid)).("license")-license[playerid];
   PLAYERLIST_authed[playerid]=true;
    return SystemMsg(playerid,"<!> Success login");
  }
  return SystemMsg(playerid,"Wrong password or nickname!");
}
But sometimes deleting license (license[playerid]=0 from Player_Name.dudb.sav I do not do it
Reply
#2

if player finished driving licence

dUserSetInit("licence",1);


if player licenced and getting a car

public onplayerentervehicle

if(licence = 1);

else

SendClientMessage(playerid, You need a licence);


Note: the codes can be false. it is only a guess
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)