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 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 DIALOG_PAYDAY 7
- #define BOJA_SERVER "{20C6EF}"
- #define BOJA_BJELA "{FFFFFF}"
- #define BOJA_CRVENA "{F80A12}"
- #define BOJA_ZELENA "{F80A12}"
- #define BOJA_ZUTA "{EDDD2B}"
- #define BOJA_LJUBICASTA "{9176F5}"
- #define BOJA_CRNA "{000000}"
- #define PROX 0xC2A2DAAA
- #define LJUBICASTA 0x9176F5
- #define SPLAVA 0x20C6EF
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define ZELENA 0xF80A12
- #define PATH "/Korisnici/%s.ini"
- enum pInfo
- {
- pLozinka[40],
- pEmail[34],
- pPorjeklo[24],
- pSpol[14],
- pGodine,
- pNovac,
- pLevel,
- pSkin,
- pSpawn,
- pExp,
- pPayDay,
- pAdmin
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new UlogovanProvera[MAX_PLAYERS];
- new PogresnaSifra[MAX_PLAYERS];
- new BigEar[ MAX_PLAYERS ];
- //===============FORWARD===============
- forward Registracija (playerid);
- public Registracija (playerid)
- {
- PlayAudioStreamForPlayer(playerid,"http:k003.kiwi6.com/hotlink/3wr1wtu451/Snoop_Dogg_Smoke_weed_every_day_dubstep_remix_.mp3");
- 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""BOJA_SERVER"R"BOJA_BJELA"egistracija",string,"Dalje","Odustani");
- return 1;
- }
- forward Login (playerid);
- public Login (playerid)
- {
- PlayAudioStreamForPlayer(playerid,"http:k003.kiwi6.com/hotlink/3wr1wtu451/Snoop_Dogg_Smoke_weed_every_day_dubstep_remix_.mp3");
- 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[325];
- 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));
- ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,""BOJA_SERVER"L"BOJA_BJELA"ogin",string,"Dalje","Odustani");
- return 1;
- }
- forward VremeDoPlace ();
- public VremeDoPlace ()
- {
- foreach(Player, i)
- {
- if(UlogovanProvera[i] == 0 ) continue;
- PlayerInfo[i][pPayDay] ++;
- if(PlayerInfo[i][pPayDay] >= 40 )
- {
- PlayerInfo[i][pPayDay] = 0;
- PlayerInfo[i][pExp] ++;
- new iskustvo = 0, serverplaca = 0;
- serverplaca = (PlayerInfo[i][pLevel] * 200) + random(150);
- iskustvo = (PlayerInfo[i][pLevel] * 2) + 2;
- new string[128];
- format(string, sizeof(string),""BOJA_SERVER"[INFO] : "BOJA_BJELA"Radili ste 40 minuta i dobili ste placu u iznosu od %i "BOJA_ZELENA"$", serverplaca);
- SendClientMessage(i,-1,string);
- GivePlayerMoney(i, serverplaca);
- new placamsg[256];
- format(placamsg, sizeof(placamsg),""BOJA_SERVER"[PLATA]"BOJA_BJELA"Ispunili ste uvjete i dobili ste platu:\n\n\
- "BOJA_SERVER" Level : "BOJA_BJELA"%d\n\
- "BOJA_SERVER" Respekti : "BOJA_BJELA"%d/%d\n\
- "BOJA_SERVER" Server Plata :"BOJA_BJELA"%d "BOJA_ZELENA"$\n",
- PlayerInfo[i][pLevel],PlayerInfo[i][pExp],iskustvo,serverplaca);
- ShowPlayerDialog(i,DIALOG_PAYDAY,DIALOG_STYLE_MSGBOX,""BOJA_SERVER"P"BOJA_BJELA"lata",placamsg,"Uredu","");
- SacuvajIgraca(i);
- if(PlayerInfo[i][pExp] >= iskustvo)
- {
- PlayerInfo[i][pLevel] ++;
- SetPlayerScore(i,PlayerInfo[i][pLevel]);
- PlayerInfo[i][pExp] = 0;
- GameTextForPlayer(i,"~g~LEVEL UP",3, 1);
- new string1[126];
- format(string1, sizeof(string1),"[LEVEL UP] : Presli ste u novi level , sada ste level %d", PlayerInfo[i][pLevel]);
- SendClientMessage(i, -1 ,string1);
- }
- }
- }
- return 1;
- }
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
- {
- if(!BigEar[i])
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, -1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, -1, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, -1, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, -1, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, -1, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- }
- return ( true );
- }
- forward UcitajIgraca_data(playerid,name[],value[]);
- public UcitajIgraca_data(playerid,name[],value[])
- {
- INI_String("Lozinka",PlayerInfo[playerid][pLozinka] , 40);
- INI_String("Email" ,PlayerInfo[playerid][pEmail],34);
- INI_String("Porjeklo" ,PlayerInfo[playerid][pPorjeklo],24);
- INI_String("Spol" ,PlayerInfo[playerid][pSpol],14);
- 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]);
- INI_Int("Exp" ,PlayerInfo[playerid][pExp]);
- INI_Int("PayDay" ,PlayerInfo[playerid][pPayDay]);
- INI_Int("Admin" ,PlayerInfo[playerid][pAdmin]);
- return 1;
- }
- forward OcistiChat(playerid, lines);
- public OcistiChat(playerid, lines)
- {
- for(new i = 0; i < lines; i++)
- {
- SendClientMessage(playerid, -1, " ");
- }
- return 1;
- }
- //===============STOKOVI==============
- stock LogKomandi( string[ ] )
- {
- new entry[ 128 ];
- format( entry, sizeof( entry ), "%s\r\n",string );
- new File:hFile;
- hFile = fopen( "Konfiguracija/LogKomandi.log", io_append );
- fwrite( hFile, entry );
- fclose( hFile );
- }
- stock PlayerRegister( playerid )
- {
- new INI:File = INI_Open( UserPath( playerid ) );
- INI_SetTag( File,"data" );
- INI_WriteString(File,"Lozinka",PlayerInfo[playerid][pLozinka]);
- 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);
- INI_WriteInt(File, "Exp" ,PlayerInfo[playerid][pExp] = 0);
- INI_WriteInt(File,"PayDay",PlayerInfo[playerid][pPayDay] = 0);
- INI_WriteInt(File ,"Level" ,PlayerInfo[playerid][pLevel] = 1);
- INI_WriteInt(File ,"Admin" ,PlayerInfo[playerid][pAdmin] = 0);
- 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);
- SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
- }
- 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]);
- INI_WriteInt(File ,"Exp" ,PlayerInfo[playerid][pExp]);
- INI_WriteInt(File ,"PayDay" ,PlayerInfo[playerid][pPayDay]);
- INI_WriteInt(File ,"Admin" ,PlayerInfo[playerid][pAdmin]);
- return 1;
- }
- public OnGameModeInit()
- {
- Create3DTextLabel(""BOJA_BJELA"Dobro dosli na "BOJA_SERVER"S"BOJA_BJELA"cript "BOJA_SERVER"o"BOJA_BJELA"f "BOJA_SERVER"R"BOJA_BJELA"ole"BOJA_SERVER"P"BOJA_BJELA"lay "BOJA_SERVER"community",SPLAVA,1605.3802,-2330.7593,13.5378, 10 , 1 , 1);
- SetGameModeText("Reg/Log");
- SetTimer("VremeDoPlace", 60000 , true);
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PogresnaSifra[playerid] = 0;
- OcistiChat(playerid,10);
- if(!fexist(UserPath(playerid)))
- {
- SetTimerEx("Registracija" , 1000 , false ,"i" ,playerid);
- }
- else
- {
- SetTimerEx("Login" , 1000 , false ,"i" ,playerid);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(UlogovanProvera[playerid] == 1)
- {
- SacuvajIgraca(playerid);
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid,-1,""BOJA_SERVER"[INFO] :"BOJA_BJELA" Da ugasite muziku , kucajte /stopmusic");
- if(PlayerInfo[playerid][pLevel] <= 2 )
- {
- new Text3D:PocetniLabel = Create3DTextLabel("[POCETNIK]",ZELENA, 30.0, 40.0, 50.0, 40.0, 0);
- Attach3DTextLabelToPlayer(PocetniLabel,playerid, 0.0, 0.0, 0.7);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new string[128];
- format(string, sizeof(string)," %s kaze : %s" , GetName(playerid) ,text);
- ProxDetector( 30.0, playerid, string, PROX,PROX,PROX,PROX,PROX );
- return 0;
- }
- /*public OnPlayerCommandText(playerid, cmdtext[])
- {
- return false;
- }
- */
- 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_LOGIN)
- {
- if(!response) Kick(playerid);
- if(response)
- {
- INI_ParseFile( UserPath( playerid ), "UcitajIgraca_%s", .bExtra = true, .extra = playerid );
- if(!strcmp(inputtext, PlayerInfo[playerid][pLozinka],false ))
- {
- UlogovanProvera[playerid] = 1;
- SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
- SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
- GivePlayerMoney(playerid,PlayerInfo[playerid][pNovac]);
- SpawnajIgraca(playerid);
- }
- else
- {
- PogresnaSifra[playerid] ++;
- new string[128];
- format(string , sizeof(string),""BOJA_CRVENA"(greska) "BOJA_BJELA"Pogrjesili ste sifru "BOJA_CRVENA"%d/4 "BOJA_BJELA", 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] == 4)
- {
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[KICK] : "BOJA_BJELA"Pogrjesili ste sifru vise od "BOJA_CRVENA"3 "BOJA_BJELA"puta i zato ste kikovani");
- Kick(playerid);
- }
- }
- }
- 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""BOJA_SERVER"R"BOJA_BJELA"egistracija",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,""BOJA_SERVER"E"BOJA_BJELA"mail","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,""BOJA_SERVER"E"BOJA_BJELA"mail","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,""BOJA_SERVER"P"BOJA_BJELA"orjeklo","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,""BOJA_SERVER"G"BOJA_BJELA"odine","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,""BOJA_SERVER"G"BOJA_BJELA"odine","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,""BOJA_SERVER"G"BOJA_BJELA"odine","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,""BOJA_SERVER"G"BOJA_BJELA"odine","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,""BOJA_SERVER"G"BOJA_BJELA"odine","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)
- {
- 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);
- 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,""BOJA_SERVER"I"BOJA_BJELA"nformacije",strinfo,"Uredu","");
- }
- else
- {
- 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);
- 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,""BOJA_SERVER"I"BOJA_BJELA"nformacije",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,""BOJA_SERVER"G"BOJA_BJELA"odine","Molimo unesite tacan broj vasih godina","Dalje","Odustani");
- }
- else
- {
- PlayerInfo[playerid][pGodine] = godine;
- ShowPlayerDialog(playerid,DIALOG_SPOL,DIALOG_STYLE_MSGBOX,""BOJA_SERVER"S"BOJA_BJELA"pol","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);
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnPlayerCommandPerformed( playerid,cmdtext[ ],success )
- {
- if(UlogovanProvera[playerid] == 0)
- {
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] : "BOJA_BJELA"Ne mozete koristiti komande dok se ne ulogujete");
- }
- if(isnull (cmdtext))
- {
- return 0;
- }
- if(!success)
- {
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] :"BOJA_BJELA"Ukucali ste nepostojecu komandu , /komande");
- }
- new string[ 128 ]; format( string,sizeof( string ),"Igrac %s | Komanda: %s",GetName( playerid ),cmdtext ); LogKomandi( string );
- return 1;
- }
- YCMD:b(playerid, params[ ], help)
- {
- #pragma unused help
- new string[ 256 ];
- if( isnull( params ) ) return SendClientMessage(playerid,-1,""BOJA_ZUTA" [KORISTENJE] : "BOJA_BJELA"/b [text]");
- format(string,256,""BOJA_SERVER"[OOC] :"BOJA_BJELA" %s kaze : %s",GetName(playerid) , params );
- ProxDetector( 17.0, playerid, string, PROX, PROX ,PROX ,PROX ,PROX );
- return 1;
- }
- YCMD:me(playerid, params[ ], help)
- {
- #pragma unused help
- new string[126];
- if(isnull ( params )) return SendClientMessage(playerid,-1,""BOJA_ZUTA" [KORISTENJE] : "BOJA_BJELA"/me [AKCIJA]");
- format(string , 126 ,""BOJA_LJUBICASTA"%s %s",GetName(playerid) , params );
- ProxDetector(10.0, playerid, string , LJUBICASTA , LJUBICASTA , LJUBICASTA , LJUBICASTA , LJUBICASTA);
- return 1;
- }
- YCMD:do(playerid, params[ ] ,help)
- {
- #pragma unused help
- new string[126];
- if(isnull (params))return SendClientMessage(playerid,-1,""BOJA_ZUTA" [KORISTENJE] : "BOJA_BJELA"/do [AKCIJA]");
- format(string , 126 ,""BOJA_LJUBICASTA"%s ((%s))",params , GetName(playerid));
- ProxDetector(10.0, playerid, string , LJUBICASTA , LJUBICASTA , LJUBICASTA , LJUBICASTA , LJUBICASTA);
- return 1;
- }
- YCMD:w(playerid, params[ ] ,help)
- {
- #pragma unused help
- new result[48],string[128],id,Float:Poz[3];
- if(sscanf(params, "us[48]",id,result)) return SendClientMessage(playerid,-1,""BOJA_ZUTA" [KORISTENJE] : "BOJA_BJELA"/w [ID] [TEXT]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] : "BOJA_BJELA"Taj igrac je offline");
- if(id == playerid) return SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] : "BOJA_BJELA"Ne mozete sami sebi saptati");
- GetPlayerPos(id, Poz[0], Poz[1], Poz[2]);
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, Poz[0], Poz[1], Poz[2])) return SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] :"BOJA_BJELA" Taj igrac nije u vasoj blizini");
- new tekst1 = strlen(result);
- for(new i = 0; i<tekst1; i++){
- result[i] = '*' ;}
- format(string, sizeof(string), ""BOJA_ZUTA"%s vam sapce: %s",GetName(playerid), result);
- SendClientMessage(id,-1,string);
- format(string, sizeof(string), ""BOJA_ZUTA"Sapnuli ste %s: %s",GetName(id), result);
- SendClientMessage(playerid,-1,string);
- format(string,sizeof(string),"%s sapce nesto %s-u.",GetName(playerid),GetName(id));
- ProxDetector(20.0, playerid, string,PROX,PROX,PROX,PROX,PROX);
- return 1;
- }
- YCMD:stopmusic(playerid, params[ ],help)
- {
- #pragma unused help
- StopAudioStreamForPlayer(playerid);
- SendClientMessage(playerid,-1,""BOJA_SERVER"[INFO] :"BOJA_BJELA" Uspjesno ste zaustavili muziku");
- return 1;
- }
- YCMD:postaviadmina(playerid , params [ ] ,help)
- {
- #pragma unused help
- new level , id , string[256] , string2[128], name[MAX_PLAYER_NAME];
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 5 )
- {
- if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,-1,""BOJA_ZUTA"[KORISTENJE] "BOJA_BJELA"/postavi [ID] [ADMIN LEVEL]");
- else if(level > 6) return SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] : "BOJA_BJELA"Najveci admin level je 6");
- else
- {
- PlayerInfo[id][pAdmin] = level;
- format(string, sizeof(string),""BOJA_ZELENA"[ADMIN POZICIJA] : "BOJA_CRVENA"Vlasnik "BOJA_CRNA"%s "BOJA_BJELA"vam je postavio "BOJA_SERVER"admina "BOJA_BJELA", level "BOJA_SERVER" %d ",GetName(playerid),level);
- SendClientMessage(id,-1,string);
- GetPlayerName(id, name, sizeof(name));
- format( string2, sizeof(string2),""BOJA_SERVER"[ACMD] : "BOJA_BJELA"Uspjesno ste postavili admina "BOJA_SERVER"%s "BOJA_BJELA", level "BOJA_SERVER"%d",name , level);
- SendClientMessage(playerid,-1,string2);
- SacuvajIgraca(id);
- }
- }
- else
- {
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] :"BOJA_BJELA" Niste ovlasteni , da bi koristili ovu komandu");
- }
- return 1;
- }
- YCMD:cc(playerid, params[ ],help)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 )
- {
- foreach (Player, i)
- {
- new string[128];
- OcistiChat(i,20);
- format(string, sizeof(string),""BOJA_BJELA""BOJA_SERVER"[INFO]: "BOJA_BJELA"Chat ociscen od strane admina "BOJA_SERVER"%s",GetName(playerid));
- SendClientMessageToAll(-1,string);
- }
- }
- else
- {
- SendClientMessage(playerid,-1,""BOJA_CRVENA"[GRESKA] :"BOJA_BJELA" Niste ovlasteni , da bi koristili ovu komandu");
- }
- return 1;
- }
- YCMD:provera(playerid, params[ ],help)
- {
- new string[126];
- format(string, sizeof(string),"Imate %d PayDay poena",PlayerInfo[playerid][pPayDay]);
- SendClientMessage(playerid,-1,string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment