Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===================================================
- //
- // Criado por DraKiNs
- //
- //===================================================
- new
- giHelperData[MAX_PLAYERS][3];
- RemovePlayerHelper(i)
- {
- return SetPlayerHelper(i, 0, 0, 0);
- }
- GetPlayerHelper(i)
- {
- static year, month, day;
- getdate(year, month, day);
- return (0 < giHelperData[i][2] >= year && 0 < giHelperData[i][0] >= day && 0 < giHelperData[i][1] >= month);
- }
- SetPlayerHelper(i, day, month, year)
- {
- return giHelperData[i][0] = day, giHelperData[i][1] = month, giHelperData[i][2] = year, true;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- static
- szName[MAX_PLAYER_NAME + 5]
- ;
- GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
- strcat(szName, ".help");
- if(!fexist(szName)) Fini_Create(szName);
- Fini_OpenFile(szName)
- {
- Fini_SetVal("Dia", giHelperData[playerid][0]);
- Fini_SetVal("Mes", giHelperData[playerid][1]);
- Fini_SetVal("Ano", giHelperData[playerid][2]);
- }
- Fini_SaveFile(szName);
- return Fini_CloseFile();
- }
- public OnPlayerConnect(playerid)
- {
- static
- szName[MAX_PLAYER_NAME + 5]
- ;
- GetPlayerName(playerid, szName, MAX_PLAYER_NAME);
- strcat(szName, ".help");
- if(!fexist(szName))
- {
- Fini_Create(szName);
- giHelperData[playerid][0] = 0;
- giHelperData[playerid][1] = 0;
- giHelperData[playerid][2] = 0;
- }
- Fini_OpenFile(szName)
- {
- giHelperData[playerid][0] = Fini_GetValue("Dia");
- giHelperData[playerid][1] = Fini_GetValue("Mes");
- giHelperData[playerid][2] = Fini_GetValue("Ano");
- }
- Fini_SaveFile(szName);
- return Fini_CloseFile(), true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement