Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //***********************************Level System filterszkript by: Naufal****************************************
- //***********************************Fordította: Sheamus***********************************
- //*****************************You can edit it but keep the credit***********************************
- //***********************************Respect other people's work*************************************
- #include <a_samp>
- #include <dini>
- new pname[MAX_PLAYER_NAME];
- new hours[256], minutes[256];
- new naufalstringxd[512];
- forward checklevel();
- public OnFilterScriptInit()
- {
- print("\n----Attemping Load Level System by Naufal----");
- print("----Level System by Naufal learn from Pasha!---");
- print("------------------Loaded!!--------------------\n");
- SetTimer("checklevel",60000,1);
- return 1;
- }
- public checklevel()
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerName(i,pname,sizeof(pname));
- format(hours, sizeof(hours), "%s-óra", pname);
- format(minutes, sizeof(minutes), "%s-perc", pname);
- if(!dini_Isset("PLEVELS.txt",hours) || !dini_Isset("PLEVELS.txt",minutes))
- {
- dini_IntSet("PLEVELS.txt",hours,0);
- dini_IntSet("PLEVELS.txt",minutes,1);
- }
- else
- {
- if(dini_Int("PLEVELS.txt",minutes)<59)
- {
- dini_IntSet("PLEVELS.txt",minutes,dini_Int("PLEVELS.txt",minutes)+1);
- }
- if(dini_Int("PLEVELS.txt",minutes)>=59)
- {
- dini_IntSet("PLEVELS.txt",hours,dini_Int("PLEVELS.txt",hours)+1);
- dini_IntSet("PLEVELS.txt",minutes,0);
- format(naufalstringxd, sizeof(naufalstringxd), "Gratulálunk!! {ffffff}%s {00ff00}Szintet léptél, Szinted: {ffcc00}%d !", pname,dini_Int("PLEVELS.txt",hours));
- SendClientMessageToAll(0xFFCC00,naufalstringxd);
- }
- }
- SetPlayerScore(i,dini_Int("PLEVELS.txt",hours));
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- GetPlayerName(playerid,pname,sizeof(pname));
- format(hours, sizeof(hours), "%s-hours", pname);
- SetPlayerScore(playerid,dini_Int("PLEVELS.txt",hours));
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n----Attemping Unload Level System by Naufal----");
- print("----Level System by Naufal learn from Pasha!---");
- print("----Fordította: Sheamus!---");
- print("-----------------Unloaded!!---------------------\n");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/szintlepes", cmdtext, true, 10) == 0)
- {
- GetPlayerName(playerid,pname,sizeof(pname));
- format(hours, sizeof(hours), "%s-óra", pname);
- format(minutes, sizeof(minutes), "%s-perc", pname);
- format(naufalstringxd,sizeof(naufalstringxd),"{ffcc00}Jelenlegi szinted: {00ff00}%d\n{ffcc00}Idő, ameddig szintet lépsz: {00ff00}%d {ffcc00}perc.",dini_Int("PLEVELS.txt",hours),60-dini_Int("PLEVELS.txt",minutes));
- ShowPlayerDialog(playerid, 5678, DIALOG_STYLE_MSGBOX, "Jelenlegi szint statisztikád", naufalstringxd, "Okés","");
- return 1;
- }
- return 0;
- }
- //***********************************A Level System by Naufal****************************************
- //*********************************** Fordította: Sheamus *****************************************
- //*****************************You can edit it but keep the credit***********************************
- //***********************************Respect other people's work*************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement