Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < a_samp >
- #include < YSI\y_ini >
- #include < YSI\y_commands >
- #include < streamer >
- #include < sscanf2 >
- #include < foreach >
- #include < OPSP >
- #include < crashdetect >
- #include < a_http >
- #include < easyDialog >
- #include < core >
- #include < float >
- #include < time >
- #include < morphinc >
- #include < file >
- #include < a_objects >
- #define BOJA_SERVER "{20C6EF}"
- #define BOJA_BJELA "{FFFFFF}"
- #define BOJA_CRVENA "{F80A12}"
- #define BOJA_ZELENA "{F80A12}"
- #define BOJA_ZUTA "{EDDD2B}"
- #define DIALOG_REGISTRACIJA 0
- #define DIALOG_EMAIL 1
- #define DIALOG_PORJEKLO 2
- #define DIALOG_GODINE 3
- #define DIALOG_SPOL 4
- #define DIALOG_INFORMACIJE 5
- #define DIALOG_LOGIN 6
- #define PATH "/Korisnici/%s.ini"
- main()
- {
- print("\n----------------------------------");
- print(" Login/Register System u izradi");
- print(" By Carlo_Smoke ");
- print("----------------------------------\n");
- }
- enum pInfo
- {
- pLozinka[40],
- pEmail[34],
- pPorjeklo[24],
- pSpol[14],
- pGodine,
- pNovac,
- pLevel,
- pSkin,
- pSpawn
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new UlogovanProvera[MAX_PLAYERS];
- new PogresnaSifra[MAX_PLAYERS];
- //===============FORWARD===============
- forward UcitajIgraca_data(playerid,name[],value[]);
- public UcitajIgraca_data(playerid,name[],value[])
- {
- INI_Int("Lozinka",PlayerInfo[playerid][pLozinka]);
- INI_Int("Email" ,PlayerInfo[playerid][pEmail]);
- INI_Int("Porjeklo" ,PlayerInfo[playerid][pPorjeklo]);
- INI_Int("Spol" ,PlayerInfo[playerid][pSpol]);
- INI_Int("Godine" ,PlayerInfo[playerid][pGodine]);
- INI_Int("Novac" ,PlayerInfo[playerid][pNovac]);
- INI_Int("Level" ,PlayerInfo[playerid][pLevel]);
- INI_Int("Skin" ,PlayerInfo[playerid][pSkin]);
- INI_Int("Spawn" ,PlayerInfo[playerid][pSpawn]);
- return 1;
- }
- forward OcistiChat(playerid, lines);
- public OcistiChat(playerid, lines)
- {
- for(new i = 0; i < lines; i++)
- {
- SendClientMessage(playerid, -1, " ");
- }
- return 1;
- }
- //===============STOKOVI==============
- stock PlayerRegister( playerid )
- {
- new INI:File = INI_Open( UserPath( playerid ) );
- INI_SetTag( File,"data" );
- INI_WriteString( File, "Lozinka",PlayerInfo[playerid][pLozinka]);
- INI_WriteInt(File, "Level",PlayerInfo[playerid][pLevel] = 1);
- INI_WriteInt(File, "Novac",PlayerInfo[playerid][pNovac] = 1000);
- INI_WriteInt(File, "Godine",PlayerInfo[playerid][pGodine]);
- INI_WriteString(File, "Spol",PlayerInfo[playerid][pSpol]);
- INI_WriteString(File, "Porjeklo",PlayerInfo[playerid][pPorjeklo]);
- INI_WriteString(File, "Email",PlayerInfo[playerid][pEmail]);
- INI_WriteInt(File, "Skin",PlayerInfo[playerid][pSkin] = 7);
- INI_WriteInt(File, "Spawn",PlayerInfo[playerid][pSpawn] = 1);
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac]);
- INI_Close(File);
- }
- stock SpawnajIgraca(playerid)
- {
- if(PlayerInfo[playerid][pSpawn] == 1)
- {
- SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin] ,1605.3802,-2330.7593,13.5378,89.0145,0,0,0,0,0,0);
- SpawnPlayer(playerid);
- TogglePlayerControllable(playerid,1);
- SetCameraBehindPlayer(playerid);
- SetPlayerColor(playerid,-1);
- SetPlayerVirtualWorld(playerid,1);
- }
- return 1;
- }
- stock GetName( id )
- {
- new ime[ MAX_PLAYER_NAME ];
- GetPlayerName( id, ime, sizeof ime );
- return ime;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock SacuvajIgraca(playerid)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteString(File ,"Lozinka" ,PlayerInfo[playerid][pLozinka]);
- INI_WriteString(File ,"Email" ,PlayerInfo[playerid][pEmail]);
- INI_WriteString(File ,"Porjeklo" ,PlayerInfo[playerid][pPorjeklo]);
- INI_WriteString(File ,"Spol" ,PlayerInfo[playerid][pSpol]);
- INI_WriteInt(File ,"Godine" ,PlayerInfo[playerid][pGodine]);
- INI_WriteInt(File ,"Novac" ,PlayerInfo[playerid][pNovac]);
- INI_WriteInt(File ,"Level" ,PlayerInfo[playerid][pLevel]);
- INI_WriteInt(File ,"Skin" ,PlayerInfo[playerid][pSkin]);
- INI_WriteInt(File ,"Spawn" ,PlayerInfo[playerid][pSpawn]);
- return 1;
- }
- public OnGameModeInit()
- {
- SetGameModeText("Reg/Log");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PogresnaSifra[playerid] = 0;
- OcistiChat(playerid,10);
- if(!fexist(UserPath(playerid)))
- {
- SetPlayerVirtualWorld(playerid,0);
- InterpolateCameraPos(playerid, -69.364471, -1505.412597, 9.126288, -24.901927, -1515.068115, 7.869946, 7000);
- InterpolateCameraLookAt(playerid, -64.529266, -1506.647827, 8.818208, -20.051826, -1516.278930, 7.971820, 1000);
- new string[512];
- format(string ,sizeof(string),""BOJA_BJELA"Dobro dosli na server "BOJA_SERVER"Script RolePlay\n\
- "BOJA_BJELA"Vi nemate registrovan korisnicki racun na ovom "BOJA_SERVER"serveru\n\
- "BOJA_BJELA"Kako bi registrovali , morate zapoceti registraciju tako sto cete unjeti vasu "BOJA_SERVER"lozinku\n\n\
- "BOJA_SERVER"Vase ime i prezime : "BOJA_BJELA"%s\n",
- GetName(playerid));
- ShowPlayerDialog(playerid,DIALOG_REGISTRACIJA,DIALOG_STYLE_PASSWORD,""BOJA_SERVER"Registracija",string,"Dalje","Odustani");
- }
- else
- {
- InterpolateCameraPos(playerid, 1402.798583, -1518.661254, 283.973510, 1493.056030, -1198.049682, 242.159561, 7000);
- InterpolateCameraLookAt(playerid, 1404.525268, -1514.084472, 282.938079, 1495.221435, -1193.547119, 241.964294, 4000);
- new string[512];
- format(string ,sizeof(string),""BOJA_BJELA"Dobro dosli na "BOJA_SERVER"Script of RolePlay "BOJA_BJELA"server\n\n\
- "BOJA_BJELA"Vase Ime i Prezime : "BOJA_SERVER"%s\n\n\
- "BOJA_BJELA"Forum : "BOJA_SERVER"www.uskoro.com\n\n\
- "BOJA_BJELA"TeamSpeak : "BOJA_SERVER"Uskoro \n\n\
- "BOJA_BJELA"Molimo unesite vasu "BOJA_SERVER"lozinku "BOJA_BJELA"kako bi ste se ulogovali na "BOJA_SERVER"Script of RolePlay "BOJA_BJELA"server\n",
- GetName(playerid));
- INI_ParseFile( UserPath( playerid ), "UcitajIgraca_%s", .bExtra = true, .extra = playerid );
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,""BOJA_SERVER"L"BOJA_BJELA"ogin",string,"Dalje","Odustani");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_REGISTRACIJA)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(strlen(inputtext) < 6 || strlen(inputtext) > 13 )
- {
- new string[512];
- format(string ,sizeof(string),""BOJA_BJELA"Dobro dosli na server "BOJA_SERVER"Script RolePlay\n\
- "BOJA_BJELA"Vi nemate registrovan korisnicki racun na ovom "BOJA_SERVER"serveru\n\
- "BOJA_BJELA"Kako bi registrovali , morate zapoceti registraciju tako sto cete unjeti vasu "BOJA_SERVER"lozinku\n\n\
- "BOJA_SERVER"Vase ime i prezime : "BOJA_BJELA"%s\n",
- GetName(playerid));
- ShowPlayerDialog(playerid,DIALOG_REGISTRACIJA,DIALOG_STYLE_PASSWORD,""BOJA_SERVER"Registracija",string,"Dalje","Odustani");
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] :"BOJA_BJELA" Vasa lozinka mora imati najmanje 6 , a najvise 13 oznaka");
- }
- else
- {
- strmid(PlayerInfo[playerid][pLozinka], inputtext, 0 ,strlen(inputtext), 255);
- ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,"Email","Molimo ukucajte vasu tacnu e-mail adresu kako bi nastavili sa registracijom","Dalje","Odustani");
- InterpolateCameraPos(playerid, 1108.074218, -1707.652587, 71.396156, 1175.231933, -1720.592041, 71.857566, 8000);
- InterpolateCameraLookAt(playerid, 1103.289184, -1706.389282, 70.683746, 1178.525512, -1723.646606, 69.661659, 5000);
- }
- }
- }
- if(dialogid == DIALOG_EMAIL )
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- new mailstring = strfind( inputtext, "@", true ), tackastring = strfind(inputtext, ".", true );
- if( mailstring == -1 || tackastring == -1 )
- {
- ShowPlayerDialog(playerid,DIALOG_EMAIL,DIALOG_STYLE_INPUT,"Email","Molimo ukucajte vasu tacnu e-mail adresu kako bi nastavili sa registracijom","Dalje","Odustani");
- SendClientMessage(playerid,-1,""BOJA_CRVENA"(greska) "BOJA_BJELA"Unjeli ste netacno e-mail adresu , e-mail adresa mora sadrziti sledece oznake @ i . ");
- }
- else
- {
- strmid(PlayerInfo[playerid][pEmail], inputtext, 0 , strlen(inputtext), 255);
- ShowPlayerDialog(playerid,DIALOG_PORJEKLO,DIALOG_STYLE_LIST,"Porjeklo","Bosna i Hercegovina\nHrvatska\nSrbija\nCrna Gora\nMakedonija","Dalje","Odustani");
- InterpolateCameraPos(playerid, 835.589477, -1803.591064, 39.280372, 834.001037, -2023.341796, 28.287334, 6000);
- InterpolateCameraLookAt(playerid, 835.414062, -1808.576538, 38.941997, 834.067871, -2028.097167, 26.743860, 3000);
- }
- }
- }
- if(dialogid == DIALOG_PORJEKLO)
- {
- if(!response) Kick(playerid);
- if(response)
- {
- switch (listitem)
- {
- case 0:
- {
- strmid(PlayerInfo[playerid][pPorjeklo], "Bosna i Hercegovina" , 0 , strlen("Bosna i Hercegovina") , 255);
- ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"Godine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- InterpolateCameraPos(playerid, 727.890747, -1779.077026, 36.417205, 728.049377, -1550.626220, 23.999475, 6000);
- InterpolateCameraLookAt(playerid, 728.237854, -1774.162231, 35.566219, 728.210327, -1545.633911, 23.773309, 3000);
- }
- case 1:
- {
- strmid(PlayerInfo[playerid][pPorjeklo], "Hrvatska" , 0 , strlen("Hrvatska") , 255);
- ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"Godine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- InterpolateCameraPos(playerid, 727.890747, -1779.077026, 36.417205, 728.049377, -1550.626220, 23.999475, 6000);
- InterpolateCameraLookAt(playerid, 728.237854, -1774.162231, 35.566219, 728.210327, -1545.633911, 23.773309, 3000);
- }
- case 2:
- {
- strmid(PlayerInfo[playerid][pPorjeklo], "Srbija" , 0 , strlen("Srbija") , 255);
- ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"Godine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- InterpolateCameraPos(playerid, 727.890747, -1779.077026, 36.417205, 728.049377, -1550.626220, 23.999475, 6000);
- InterpolateCameraLookAt(playerid, 728.237854, -1774.162231, 35.566219, 728.210327, -1545.633911, 23.773309, 3000);
- }
- case 3:
- {
- strmid(PlayerInfo[playerid][pPorjeklo], "Crna Gora" , 0 , strlen("Crna Gora") , 255);
- ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"Godine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- InterpolateCameraPos(playerid, 727.890747, -1779.077026, 36.417205, 728.049377, -1550.626220, 23.999475, 6000);
- InterpolateCameraLookAt(playerid, 728.237854, -1774.162231, 35.566219, 728.210327, -1545.633911, 23.773309, 3000);
- }
- case 4:
- {
- strmid(PlayerInfo[playerid][pPorjeklo], "Makedonija" , 0 , strlen("Makedonija") , 255);
- ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_INPUT,"Godine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- InterpolateCameraPos(playerid, 727.890747, -1779.077026, 36.417205, 728.049377, -1550.626220, 23.999475, 6000);
- InterpolateCameraLookAt(playerid, 728.237854, -1774.162231, 35.566219, 728.210327, -1545.633911, 23.773309, 3000);
- }
- }
- }
- }
- if(dialogid == DIALOG_SPOL)
- {
- if(response)
- {
- strmid(PlayerInfo[playerid][pSpol], "Musko" , 0 ,strlen("Musko"), 255);
- new strinfo[256];
- format(strinfo, sizeof(strinfo),""BOJA_ZUTA"Informacije o korisniku :\n\n\
- "BOJA_SERVER"Ime i Prezime : "BOJA_BJELA" %s\n\
- "BOJA_SERVER"E-mail :"BOJA_BJELA" %s\n\
- "BOJA_SERVER"Godine :"BOJA_BJELA" %d\n\
- "BOJA_SERVER"Porjeklo :"BOJA_BJELA" %s\n\
- "BOJA_SERVER"Spol :"BOJA_BJELA" %s\n",
- GetName(playerid),PlayerInfo[playerid][pEmail],PlayerInfo[playerid][pGodine],PlayerInfo[playerid][pPorjeklo],PlayerInfo[playerid][pSpol]);
- ShowPlayerDialog(playerid,DIALOG_INFORMACIJE,DIALOG_STYLE_MSGBOX,"Informacije",strinfo,"Uredu","");
- }
- else
- {
- strmid(PlayerInfo[playerid][pSpol], "Zensko" , 0 ,strlen("Zensko"), 255);
- new strinfo[512];
- format(strinfo, sizeof(strinfo),""BOJA_ZUTA"Informacije o korisniku :\n\n\
- "BOJA_SERVER"Ime i Prezime : "BOJA_BJELA"%s\n\
- "BOJA_SERVER"E-mail : "BOJA_BJELA"%s\n\
- "BOJA_SERVER"Godine : "BOJA_BJELA"%d\n\
- "BOJA_SERVER"Porjeklo : "BOJA_BJELA"%s\n\
- "BOJA_SERVER"Spol : "BOJA_BJELA"%s\n",
- GetName(playerid),PlayerInfo[playerid][pEmail],PlayerInfo[playerid][pGodine],PlayerInfo[playerid][pPorjeklo],PlayerInfo[playerid][pSpol]);
- ShowPlayerDialog(playerid,DIALOG_INFORMACIJE,DIALOG_STYLE_MSGBOX,"Informacije",strinfo,"Uredu","");
- }
- }
- if(dialogid == DIALOG_GODINE)
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- new godine = strval( inputtext );
- if(godine < 12 || godine > 70)
- {
- SendClientMessage(playerid,-1,""BOJA_CRVENA"(greska) "BOJA_BJELA"Ne mozete imati manje od 12 ili vise od 70 godina , pokusajte ponovo");
- ShowPlayerDialog(playerid,DIALOG_GODINE,DIALOG_STYLE_MSGBOX,"Godine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- }
- else
- {
- PlayerInfo[playerid][pGodine] = godine;
- ShowPlayerDialog(playerid,DIALOG_SPOL,DIALOG_STYLE_MSGBOX,"Spol","Molimo odaberite vas spol kako bi nastavili s registracijom","Musko","Zensko");
- InterpolateCameraPos(playerid, 1380.028198, -1148.478271, 173.164794, 1396.126098, -958.274597, 120.091224, 6000);
- InterpolateCameraLookAt(playerid, 1380.740722, -1143.868652, 171.363677, 1396.859985, -953.527099, 118.704605, 3000);
- }
- }
- }
- if(dialogid == DIALOG_INFORMACIJE)
- {
- if(response)
- {
- PlayerRegister(playerid);
- UlogovanProvera[playerid] = 1;
- PlayerInfo[playerid][pSpawn] = 1; //Deafult Spawn
- SpawnajIgraca(playerid);
- }
- }
- switch(dialogid)
- {
- case DIALOG_LOGIN:
- {
- if(!response) return Kick(playerid);
- if(response)
- {
- if(!strcmp(inputtext ,PlayerInfo[playerid][pLozinka], false))
- {
- if(PogresnaSifra[playerid] == 0 )
- {
- PogresnaSifra[playerid] = 1;
- new string[256];
- format(string , sizeof(string),""BOJA_CRVENA"(greska) "BOJA_BJELA"Pogrjesili ste sifru , molimo pokusajte ponovo",PogresnaSifra[playerid]);
- SendClientMessage(playerid,-1,string);
- new stringrelog[512];
- format(stringrelog , sizeof(stringrelog),""BOJA_BJELA"Dobrodosli na "BOJA_SERVER"Server RP\n\n\
- "BOJA_SERVER"Vase Ime i Prezime : "BOJA_BJELA"%s\n\n\
- "BOJA_SERVER"Forum : "BOJA_BJELA"www.uskoro.com\n\n\
- "BOJA_SERVER"TeamSpeak : "BOJA_BJELA"Uskoro\n\n\
- "BOJA_BJELA"Molimo ukucajte vasu "BOJA_SERVER"lozinku "BOJA_BJELA"kako bi usli na server\n",
- GetName(playerid));
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",stringrelog,"Login","Odustani");
- }
- if(PogresnaSifra[playerid] == 1)
- {
- PogresnaSifra[playerid] = 2;
- new string[256];
- format(string , sizeof(string),""BOJA_CRVENA"(greska) "BOJA_BJELA"Pogrjesili ste sifru , molimo pokusajte ponovo",PogresnaSifra[playerid]);
- SendClientMessage(playerid,-1,string);
- new stringrelog[512];
- format(stringrelog , sizeof(stringrelog),""BOJA_BJELA"Dobrodosli na "BOJA_SERVER"Server RP\n\n\
- "BOJA_SERVER"Vase Ime i Prezime : "BOJA_BJELA"%s\n\n\
- "BOJA_SERVER"Forum : "BOJA_BJELA"www.uskoro.com\n\n\
- "BOJA_SERVER"TeamSpeak : "BOJA_BJELA"Uskoro\n\n\
- "BOJA_BJELA"Molimo ukucajte vasu "BOJA_SERVER"lozinku "BOJA_BJELA"kako bi usli na server\n",
- GetName(playerid));
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",stringrelog,"Login","Odustani");
- }
- if(PogresnaSifra[playerid] == 2)
- {
- PogresnaSifra[playerid] = 3;
- new string[256];
- format(string , sizeof(string),""BOJA_CRVENA"(greska) "BOJA_BJELA"Pogrjesili ste sifru , molimo pokusajte ponovo %d/4",PogresnaSifra[playerid]);
- SendClientMessage(playerid,-1,string);
- new stringrelog[512];
- format(stringrelog , sizeof(stringrelog),""BOJA_BJELA"Dobrodosli na "BOJA_SERVER"Server RP\n\n\
- "BOJA_SERVER"Vase Ime i Prezime : "BOJA_BJELA"%s\n\n\
- "BOJA_SERVER"Forum : "BOJA_BJELA"www.uskoro.com\n\n\
- "BOJA_SERVER"TeamSpeak : "BOJA_BJELA"Uskoro\n\n\
- "BOJA_BJELA"Molimo ukucajte vasu "BOJA_SERVER"lozinku "BOJA_BJELA"kako bi usli na server\n",
- GetName(playerid));
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",stringrelog,"Login","Odustani");
- }
- if(PogresnaSifra[playerid] == 3)
- {
- PogresnaSifra[playerid] = 4;
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[KICK] :"BOJA_BJELA"4 puta ste pogrjesili sifru i zato ste kikovani sa servera");
- Kick(playerid);
- }
- else
- {
- INI_ParseFile( UserPath( playerid ), "UcitajIgraca_%s", .bExtra = true, .extra = playerid );
- UlogovanProvera[playerid] = 1;
- SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
- SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
- GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac]);
- SpawnajIgraca(playerid);
- }
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement