SA-MP Forums Archive
NOT SAVED:@:@ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: NOT SAVED:@:@ (/showthread.php?tid=470773)



NOT SAVED:@:@ - armando112 - 19.10.2013

Hello! I have a car license system problem is when I go and buy the license says I bought it .... but they go out and come in again .. MUST BUY AGAIN


Re: NOT SAVED:@:@ - Twizted - 19.10.2013

Can you post your code here?


Re: NOT SAVED:@:@ - armando112 - 19.10.2013

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    GetPlayerName(playerid, pname, sizeof(pname));
    format(playerfile, sizeof(playerfile), "Licenses/%s.ini",pname);
    dini_IntSet(playerfile, "Car License", LicenseInfo[playerid][Car]);
    return 1;
}

public OnPlayerConnect(playerid)
{
    GetPlayerName(playerid, pname, sizeof(pname));
    format(playerfile, sizeof(playerfile), "Licenses/%s.ini",pname);
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    GetPlayerName(playerid, pname, sizeof(pname));
    format(playerfile, sizeof(playerfile), "Licenses/%s.ini",pname);
    LicenseInfo[playerid][Car] = dini_Int(playerfile, "Car License");
    return 1;
}