Jump to content

Sweet

Uživatel
  • Příspěvků

    747
  • Registrován

  • Aktivní

Příspěvky posted by Sweet

  1. qtfcweogtt7epizmhs3q.png

     

    Čau,

    konečně jsem dodělal mód Mafia Roleplay, pokud nevíte o co jde navštivte:

    http://pawno.cz/topi...mafia-roleplay/

    Jelikož v tom topicu nevím jak upravit úvodní příspěvek. Napíšu sem pár věcí co jsem udělal a nenapsal je tam.

     

    - hraje se v San Fierru a Area 51

    - na serveru můžete vidět trochu předělané prostředí kolem nádraží a wang cars

    - "nová čtvrť" vedle wang cars

    - můžete sprejovat na určité zdi, sprej najdete ve zmiňované čtvrti

    - můžete si vytvořit mafii s vlastním názvem, sídlem i výplatami pro členy

    - můžete si koupit auto a poté ho zaparkovat, zamknout, spawnout.... (cena auta se pohybuje podle rychlosti a spotřebě paliva)

    - můžete si kupovat různé věci v obchodech, které časem budou úplně v celém SF

    - můžete pracovat až ve třinácti povoláních, ne všechny ale můžete dělat od lvlu 1

    - cca 10 animací (časem přibudou)

    - vlastní house system a business system

    - jelikož je to roleplay tak musíte vědět jak se hraje (při registraci malý návod jak hrát)

    - rozlišuje se OOC psaní (do OOC se píše přes !text) a IC psaní (psaní normálně do chatu)

    - vlastní malý interiér nemocnice

    - můžete si koupit mobil (podle ceny mobilu, cena smsky)

    - na serveru se nachází bug, který momentálně opravujeme (když přijdete na server, někdy se stane že se vám parkrát restartuje hra, nemusíte se bát, že přijdete o údaje v účtě, jen musíte počkat dokud se prostě normálně nepřipojíte, poznáte to tím, že se vám zobrazí dialog na přihlášení nebo registraci, většinou se hra restartuje 2x a poté to jde nebo se vám nerestartuje vůbec a vše běží jak má)

     

    Na webu probíhají poslední úpravy a brzy ho tu zveřejním.

     

    Velké díky patří těmto lidem, kteří se mnou testovali mód při vývoji:

    TheTotifus, Ar3st, MiskulunCZ, Skrilex

     

    Také těmto dvou lidem za to, že mi pomohli když něco nefungovalo:

    Mafian189, lyrics911, ATomas

     

    A naposled uživateli, který vytvořil header na web:

    ManSlayer

     

    A pro ty kdo nevědí, roleplay se hraje s roleplay nickem. Jinak se na server nedostanete.

    Zvolte si nick v tomto formátu: Jmeno_Prijmeni (bez diakritiky).

     

    IP: 37.157.198.57:7777

     

    Server status mi sem nejde dát, takže ho přidám později.

     

    Naskytnul se nějaký problém, který na windows serveru není, takže nešel zjistit. Brzy bude server odemčen.

  2. Opravdu je fexists zapotrebi vsude kde pracuju se souborama? nemelo by to stacit, kdyz to vytvori pri registraci? protoze to deli registraci a prihlaseni podle toho jestli soubor existuje a pak uz se to tim padem musi automaticky do toho ukladat nebo z toho nacitat kdyz se vi predem ze je to vytvoreny

     

    OnPlayerDisconnect

    public OnPlayerDisconnect(playerid, reason)
    {
    if(Information[playerid][isLogged] == true)
    {
    new string[256];
    format(string, sizeof(string), soubor, PlayerConnectName(playerid));
    new File:SaveFile = fopen(string, io_write);
    if(SaveFile)
    {
    new napis[1000];
    format(napis, sizeof(napis), "Heslo=%d", Information[playerid][Heslo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nAdministrator=%d", Information[playerid][Administrator]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZabiti=%d", Information[playerid][Zabiti]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nUmrti=%d", Information[playerid][umrti]); fwrite(SaveFile, napis);
    Information[playerid][skin] = GetPlayerSkin(playerid);
    format(napis, sizeof(napis), "\nSkin=%d", Information[playerid][skin]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nLevel=%d", Information[playerid][Level]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBody=%d", Information[playerid][body]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPenize=%d", GetPlayerMoney(playerid)); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZamestnani=%d", Information[playerid][Zamestnani]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBanka=%d", Information[playerid][banka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nRidicak=%d", Information[playerid][Ridicak]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nObcanka=%d", Information[playerid][Obcanka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZbrojak=%d", Information[playerid][Zbrojak]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPolicejniZK=%d", Information[playerid][PolicejniZK]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nMarihuana=%d", Information[playerid][Marihuana]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nSeminko=%d", Information[playerid][seminko]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nMobil=%d", Information[playerid][Mobil]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nKurak=%d", Information[playerid][Kurak]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nWC=%d", Potreby[playerid][WC]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nJidlo=%d", Potreby[playerid][Jidlo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPiti=%d", Potreby[playerid][Piti]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nSpanek=%d", Potreby[playerid][spanek]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZavislost=%d", Potreby[playerid][Zavislost]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nFirstPerson=%d", PlayerFirstPerson[playerid]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVezen=%d", Vezen[playerid]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nCela=%d", Information[playerid][Cela]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVezeni=%d", Information[playerid][Vezeni]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nChleba=%d", Potrava[playerid][Chleba]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nMrazeneMaso=%d", Potrava[playerid][MrazeneMaso]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPeceneMaso=%d", Potrava[playerid][PeceneMaso]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nJablko=%d", Potrava[playerid][Jablko]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nHruska=%d", Potrava[playerid][Hruska]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBanan=%d", Potrava[playerid][banan]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nDonut=%d", Potrava[playerid][Donut]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPizza=%d", Potrava[playerid][Pizza]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nSusenka=%d", Potrava[playerid][susenka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVoda=%d", Napoje[playerid][Voda]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nLimonada=%d", Napoje[playerid][Limonada]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nCola=%d", Napoje[playerid][Cola]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPivo=%d", Napoje[playerid][Pivo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVino=%d", Napoje[playerid][Vino]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVodka=%d", Napoje[playerid][Vodka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nRum=%d", Napoje[playerid][Rum]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nWhiskey=%d", Napoje[playerid][Whiskey]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZapalky=%d", Veci[playerid][Zapalky]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nRadio=%d", Veci[playerid][Radio]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nNoviny=%d", Veci[playerid][Noviny]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nCigareta=%d", Veci[playerid][Cigareta]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nHlava=%d", Hlava[playerid]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBryle=%d", Bryle[playerid]); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nBatoh=%d", Batoh[playerid]); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nNovyKurak=%d", NovyKurak[playerid]); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_Pistole=%d", GetPVarInt(playerid,"WEAPONSKILL_PISTOL")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_PistoleSilenced=%d", GetPVarInt(playerid,"WEAPONSKILL_PISTOL_SILENCED")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_DesertEagle=%d", GetPVarInt(playerid,"WEAPONSKILL_DESERT_EAGLE")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_Shotgun=%d", GetPVarInt(playerid,"WEAPONSKILL_SHOTGUN")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_MicroUzi=%d", GetPVarInt(playerid,"WEAPONSKILL_MICRO_UZI")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_MP5=%d", GetPVarInt(playerid,"WEAPONSKILL_MP5")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_AK47=%d", GetPVarInt(playerid,"WEAPONSKILL_AK47")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_M4=%d", GetPVarInt(playerid,"WEAPONSKILL_M4")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_SniperRifle=%d", GetPVarInt(playerid,"WEAPONSKILL_SNIPERRIFLE")); fwrite(SaveFile, napis);
    fclose(SaveFile);
    }
    //----
    SavePlayerVehicle(playerid);
    SavePlayerMafia(playerid);
    }
    //----
    switch(Mafia[playerid][Hodnost])
    {
    case 1: PocetAssociate[Mafia[playerid][iD]]--;
    case 2: PocetCapo[Mafia[playerid][iD]]--;
    case 3: PocetConsigliere[Mafia[playerid][iD]]--;
    }
    //--------------------------------------------------------------------
    new string[128];
    switch(reason)
    {
     case 0: format(string, sizeof(string), "Hráč {33CCFF}%s {FFFFFF}se odpojil ze serveru! (Pád hry)", PlayerName(playerid));
     case 1: format(string, sizeof(string), "Hráč {33CCFF}%s {FFFFFF}se odpojil ze serveru! (Odešel)", PlayerName(playerid));
     case 2: format(string, sizeof(string), "Hráč {33CCFF}%s {FFFFFF}se odpojil ze serveru! (Kick/Ban)", PlayerName(playerid));
    }
    SCMTA(COLOR_WHITE, string);
    //--------------------------------------------------------------------
    Information[playerid][isLogged] = false;
    new pri[128];
    gettime(hodinar, minutar, sekundar);
    getdate(rokr, mesicr, denr);
    format(pri, sizeof(pri), "Hrac se odpojil [%d:%d:%d | %d.%d.%d]", hodinar, minutar, sekundar, denr, mesicr, rokr);
    Log(playerid, pri);
    Log(playerid, "------------------------------------------");
    return 1;
    }
    

     

    dcmd_noviny

    dcmd_noviny(playerid, params[])
    {
    #pragma unused params
    if(Veci[playerid][Noviny] == 1)
    {
     new string[2000];
    new File:fil = fopen("/Mafia/Noviny.txt", io_read);
     fread(fil, string);
     Oznameni(playerid, "Stiskni L.CTRL až budeš chtít přestat číst noviny!");
    ZobrazeneNoviny[playerid] = true;
    //TDString(string);
    StlipString(string, 38);
     TextDrawSetString(NovinyText, string);
     TextDrawShowForPlayer(playerid, Noviny1);
     TextDrawShowForPlayer(playerid, Noviny2);
     TextDrawShowForPlayer(playerid, NovinyText);
     fclose(fil);
    }
    else
    {
     Varovani(playerid, "Nemáš noviny!");
    }
    Log(playerid, "Hrac dal prikaz /noviny");
    return 1;
    }
    

     

    public Ukladani

    public Ukladani(playerid) // ukladani
    {
    if(Information[playerid][isLogged] == true)
    {
    new string[256];
    format(string, sizeof(string), "Philadelphia/Accounts/%s.sav", PlayerName(playerid));
    new File:SaveFile = fopen(string, io_write);
    if(SaveFile)
    {
    new napis[1000];
    format(napis, sizeof(napis), "Heslo=%d", Information[playerid][Heslo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nAdministrator=%d", Information[playerid][Administrator]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZabiti=%d", Information[playerid][Zabiti]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nUmrti=%d", Information[playerid][umrti]); fwrite(SaveFile, napis);
    Information[playerid][skin] = GetPlayerSkin(playerid);
    format(napis, sizeof(napis), "\nSkin=%d", Information[playerid][skin]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nLevel=%d", Information[playerid][Level]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBody=%d", Information[playerid][body]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPenize=%d", GetPlayerMoney(playerid)); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZamestnani=%d", Information[playerid][Zamestnani]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBanka=%d", Information[playerid][banka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nRidicak=%d", Information[playerid][Ridicak]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nObcanka=%d", Information[playerid][Obcanka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZbrojak=%d", Information[playerid][Zbrojak]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPolicejniZK=%d", Information[playerid][PolicejniZK]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nMarihuana=%d", Information[playerid][Marihuana]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nSeminko=%d", Information[playerid][seminko]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nMobil=%d", Information[playerid][Mobil]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nKurak=%d", Information[playerid][Kurak]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nWC=%d", Potreby[playerid][WC]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nJidlo=%d", Potreby[playerid][Jidlo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPiti=%d", Potreby[playerid][Piti]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nSpanek=%d", Potreby[playerid][spanek]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZavislost=%d", Potreby[playerid][Zavislost]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nFirstPerson=%d", PlayerFirstPerson[playerid]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVezen=%d", Vezen[playerid]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nCela=%d", Information[playerid][Cela]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVezeni=%d", Information[playerid][Vezeni]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nChleba=%d", Potrava[playerid][Chleba]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nMrazeneMaso=%d", Potrava[playerid][MrazeneMaso]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPeceneMaso=%d", Potrava[playerid][PeceneMaso]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nJablko=%d", Potrava[playerid][Jablko]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nHruska=%d", Potrava[playerid][Hruska]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBanan=%d", Potrava[playerid][banan]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nDonut=%d", Potrava[playerid][Donut]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPizza=%d", Potrava[playerid][Pizza]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nSusenka=%d", Potrava[playerid][susenka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVoda=%d", Napoje[playerid][Voda]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nLimonada=%d", Napoje[playerid][Limonada]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nCola=%d", Napoje[playerid][Cola]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nPivo=%d", Napoje[playerid][Pivo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVino=%d", Napoje[playerid][Vino]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nVodka=%d", Napoje[playerid][Vodka]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nRum=%d", Napoje[playerid][Rum]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nWhiskey=%d", Napoje[playerid][Whiskey]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nZapalky=%d", Veci[playerid][Zapalky]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nRadio=%d", Veci[playerid][Radio]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nNoviny=%d", Veci[playerid][Noviny]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nCigareta=%d", Veci[playerid][Cigareta]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nHlava=%d", Hlava[playerid]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "\nBryle=%d", Bryle[playerid]); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nBatoh=%d", Batoh[playerid]); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nNovyKurak=%d", NovyKurak[playerid]); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_Pistole=%d", GetPVarInt(playerid,"WEAPONSKILL_PISTOL")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_PistoleSilenced=%d", GetPVarInt(playerid,"WEAPONSKILL_PISTOL_SILENCED")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_DesertEagle=%d", GetPVarInt(playerid,"WEAPONSKILL_DESERT_EAGLE")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_Shotgun=%d", GetPVarInt(playerid,"WEAPONSKILL_SHOTGUN")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_MicroUzi=%d", GetPVarInt(playerid,"WEAPONSKILL_MICRO_UZI")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_MP5=%d", GetPVarInt(playerid,"WEAPONSKILL_MP5")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_AK47=%d", GetPVarInt(playerid,"WEAPONSKILL_AK47")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_M4=%d", GetPVarInt(playerid,"WEAPONSKILL_M4")); fwrite(SaveFile, napis);
    	 format(napis, sizeof(napis), "\nSkill_SniperRifle=%d", GetPVarInt(playerid,"WEAPONSKILL_SNIPERRIFLE")); fwrite(SaveFile, napis);
    	 fclose(SaveFile);
    }
    }
    //----
    SavePlayerVehicle(playerid);
    SavePlayerMafia(playerid);
    return 1;
    }
    

     

    Nacitani uctu, publicy

    public Nacitani1(playerid) // nacitani
    {
    new path[256];
    format(path, sizeof(path), soubor, PlayerConnectName(playerid));
    new File:LogFile = fopen(path, io_read);
    if(LogFile)
    {
    new key[256], val[256], Data[256];
    while(fread(LogFile, Data, sizeof(Data)))
    {
    key = file_GetKey(Data);
    if(strcmp(key, "Administrator", true) == 0) { val = file_GetValue(Data); Information[playerid][Administrator] = strval(val); }
    if(strcmp(key, "Zabiti", true) == 0) { val = file_GetValue(Data); Information[playerid][Zabiti] = strval(val); }
    if(strcmp(key, "Umrti", true) == 0) { val = file_GetValue(Data); Information[playerid][umrti] = strval(val); }
    if(strcmp(key, "Skin", true) == 0) { val = file_GetValue(Data); Information[playerid][skin] = strval(val); }
    if(strcmp(key, "Level", true) == 0) { val = file_GetValue(Data); Information[playerid][Level] = strval(val); }
    if(strcmp(key, "Body", true) == 0) { val = file_GetValue(Data); Information[playerid][body] = strval(val); }
    if(strcmp(key, "Zamestnani", true) == 0) { val = file_GetValue(Data); Information[playerid][Zamestnani] = strval(val); }
    if(strcmp(key, "Banka", true) == 0) { val = file_GetValue(Data); Information[playerid][banka] = strval(val); }
    if(strcmp(key, "Ridicak", true) == 0) { val = file_GetValue(Data); Information[playerid][Ridicak] = strval(val); }
    if(strcmp(key, "Obcanka", true) == 0) { val = file_GetValue(Data); Information[playerid][Obcanka] = strval(val); }
    if(strcmp(key, "Zbrojak", true) == 0) { val = file_GetValue(Data); Information[playerid][Zbrojak] = strval(val); }
    if(strcmp(key, "PolicejniZK", true) == 0) { val = file_GetValue(Data); Information[playerid][PolicejniZK] = strval(val); }
    if(strcmp(key, "Marihuana", true) == 0) { val = file_GetValue(Data); Information[playerid][Marihuana] = strval(val); }
    if(strcmp(key, "Seminko", true) == 0) { val = file_GetValue(Data); Information[playerid][seminko] = strval(val); }
    if(strcmp(key, "Mobil", true) == 0) { val = file_GetValue(Data); Information[playerid][Mobil] = strval(val); }
    if(strcmp(key, "Kurak", true) == 0) { val = file_GetValue(Data); Information[playerid][Kurak] = strval(val); }
    if(strcmp(key, "WC", true) == 0) { val = file_GetValue(Data); Potreby[playerid][WC] = strval(val); }
    if(strcmp(key, "Jidlo", true) == 0) { val = file_GetValue(Data); Potreby[playerid][Jidlo] = strval(val); }
    if(strcmp(key, "Piti", true) == 0) { val = file_GetValue(Data); Potreby[playerid][Piti] = strval(val); }
    if(strcmp(key, "Spanek", true) == 0) { val = file_GetValue(Data); Potreby[playerid][spanek] = strval(val); }
    if(strcmp(key, "Zavislost", true) == 0) { val = file_GetValue(Data); Potreby[playerid][Zavislost] = strval(val); }
    if(strcmp(key, "FirstPerson", true) == 0) { val = file_GetValue(Data); PlayerFirstPerson[playerid] = strval(val); }
    if(strcmp(key, "Vezen", true) == 0) { val = file_GetValue(Data); Vezen[playerid] = strval(val); }
    if(strcmp(key, "Cela", true) == 0) { val = file_GetValue(Data); Information[playerid][Cela] = strval(val); }
    if(strcmp(key, "Vezeni", true) == 0) { val = file_GetValue(Data); Information[playerid][Vezeni] = strval(val); }
    if(strcmp(key, "Chleba", true) == 0) { val = file_GetValue(Data); Potrava[playerid][Chleba] = strval(val); }
    if(strcmp(key, "MrazeneMaso", true) == 0) { val = file_GetValue(Data); Potrava[playerid][MrazeneMaso] = strval(val); }
    if(strcmp(key, "PeceneMaso", true) == 0) { val = file_GetValue(Data); Potrava[playerid][PeceneMaso] = strval(val); }
    if(strcmp(key, "Jablko", true) == 0) { val = file_GetValue(Data); Potrava[playerid][Jablko] = strval(val); }
    if(strcmp(key, "Hruska", true) == 0) { val = file_GetValue(Data); Potrava[playerid][Hruska] = strval(val); }
    if(strcmp(key, "Banan", true) == 0) { val = file_GetValue(Data); Potrava[playerid][banan] = strval(val); }
    if(strcmp(key, "Donut", true) == 0) { val = file_GetValue(Data); Potrava[playerid][Donut] = strval(val); }
    if(strcmp(key, "Pizza", true) == 0) { val = file_GetValue(Data); Potrava[playerid][Pizza] = strval(val); }
    if(strcmp(key, "Susenka", true) == 0) { val = file_GetValue(Data); Potrava[playerid][susenka] = strval(val); }
    if(strcmp(key, "Penize", true) == 0) { val = file_GetValue(Data); GivePlayerMoney(playerid, strval(val)); }
    }
    }
    return 1;
    }
    public Nacitani2(playerid) // nacitani
    {
    new path[256];
    format(path, sizeof(path), soubor, PlayerConnectName(playerid));
    new File:LogFile = fopen(path, io_read);
    if(LogFile)
    {
    new key[256], val[256], Data[256];
    while(fread(LogFile, Data, sizeof(Data)))
    {
    key = file_GetKey(Data);
    if(strcmp(key, "Voda", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Voda] = strval(val); }
    if(strcmp(key, "Limonada", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Limonada] = strval(val); }
    if(strcmp(key, "Cola", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Cola] = strval(val); }
    if(strcmp(key, "Pivo", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Pivo] = strval(val); }
    if(strcmp(key, "Vino", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Vino] = strval(val); }
    if(strcmp(key, "Vodka", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Vodka] = strval(val); }
    if(strcmp(key, "Rum", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Rum] = strval(val); }
    if(strcmp(key, "Whiskey", true) == 0) { val = file_GetValue(Data); Napoje[playerid][Whiskey] = strval(val); }
    if(strcmp(key, "Zapalky", true) == 0) { val = file_GetValue(Data); Veci[playerid][Zapalky] = strval(val); }
    if(strcmp(key, "Radio", true) == 0) { val = file_GetValue(Data); Veci[playerid][Radio] = strval(val); }
    if(strcmp(key, "Noviny", true) == 0) { val = file_GetValue(Data); Veci[playerid][Noviny] = strval(val); }
    if(strcmp(key, "Cigareta", true) == 0) { val = file_GetValue(Data); Veci[playerid][Cigareta] = strval(val); }
    if(strcmp(key, "Hlava", true) == 0) { val = file_GetValue(Data); Hlava[playerid] = strval(val); }
    if(strcmp(key, "Bryle", true) == 0) { val = file_GetValue(Data); Bryle[playerid] = strval(val); }
    if(strcmp(key, "Batoh", true) == 0) { val = file_GetValue(Data); Batoh[playerid] = strval(val); }
    if(strcmp(key, "NovyKurak", true) == 0) { val = file_GetValue(Data); NovyKurak[playerid] = strval(val); }
    if(strcmp(key, "Skill_Pistole", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_PISTOL, strval(val)); }
    if(strcmp(key, "Skill_PistoleSilenced", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_PISTOL_SILENCED, strval(val)); }
    if(strcmp(key, "Skill_DesertEagle", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_DESERT_EAGLE, strval(val)); }
    if(strcmp(key, "Skill_Shotgun", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_SHOTGUN, strval(val)); }
    if(strcmp(key, "Skill_MicroUzi", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_MICRO_UZI, strval(val)); }
    if(strcmp(key, "Skill_MP5", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_MP5, strval(val)); }
    if(strcmp(key, "Skill_AK47", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_AK47, strval(val)); }
    if(strcmp(key, "Skill_M4", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_M4, strval(val)); }
    if(strcmp(key, "Skill_SniperRifle", true) == 0) { val = file_GetValue(Data); SetPlayerWeaponSkill(playerid, WEAPONSKILL_SNIPERRIFLE, strval(val)); }
    }
    }
    //-------------------------------------------------------------
    SetPlayerMapIcon(playerid, 51, -2175.0884,-221.1353,35.3203, 51, 0, MAPICON_LOCAL); // rozvazec zbozi
    SetPlayerMapIcon(playerid, 55, -2030.5823,-101.4407,35.1641, 55, 0, MAPICON_LOCAL); // autoskola
    SetPlayerMapIcon(playerid, 19, -1952.4281,701.7631,46.5625, 19, 0, MAPICON_LOCAL); // urad
    SetPlayerMapIcon(playerid, 20, -2022.7416,77.0513,28.0843, 20, 0, MAPICON_LOCAL); // hasic
    SetPlayerMapIcon(playerid, 30, -1614.9637,686.4373,7.1875, 30, 0, MAPICON_LOCAL); // policejni stanice
    SetPlayerMapIcon(playerid, 22, -2665.0403,639.5907,14.4531, 22, 0, MAPICON_LOCAL); // nemocnice
    SetPlayerMapIcon(playerid, 24, -1820.0212,-149.4014,9.3984, 24, 0, MAPICON_LOCAL); // elektrikar
    SetPlayerMapIcon(playerid, 11, -1831.9998,111.8324,15.1172, 11, 0, MAPICON_LOCAL); // popelar
    SetPlayerMapIcon(playerid, 42, -1609.8615,1284.8673,7.1774, 42, 0, MAPICON_LOCAL); // taxikar
    SetPlayerMapIcon(playerid, 25, -1493.8568,920.2960,7.1875, 25, 0, MAPICON_LOCAL); // pravnik
    SetPlayerMapIcon(playerid, 36, -1550.6666,1061.9308,7.1875, 36, 0, MAPICON_LOCAL); // banka
    SetPlayerMapIcon(playerid, 52, -1570.2273,647.1268,7.1875, 52, 0, MAPICON_LOCAL); // bankomat 1
    SetPlayerMapIcon(playerid, 52, -1629.4084,1175.0319,7.2840, 52, 0, MAPICON_LOCAL); // bankomat 2
    SetPlayerMapIcon(playerid, 52, -1944.6375,1342.3495,7.1875, 52, 0, MAPICON_LOCAL); // bankomat 3
    SetPlayerMapIcon(playerid, 52, -1963.9789,1342.3041,7.1841, 52, 0, MAPICON_LOCAL); // bankomat 4
    SetPlayerMapIcon(playerid, 52, -2513.5898,745.8508,35.0156, 52, 0, MAPICON_LOCAL); // bankomat 5
    SetPlayerMapIcon(playerid, 52, -2584.9004,459.5820,14.6094, 52, 0, MAPICON_LOCAL); // bankomat 6
    SetPlayerMapIcon(playerid, 52, -2216.2837,554.9881,35.1719, 52, 0, MAPICON_LOCAL); // bankomat 7
    SetPlayerMapIcon(playerid, 52, -2285.2803,729.9798,49.4410, 52, 0, MAPICON_LOCAL); // bankomat 8
    SetPlayerMapIcon(playerid, 52, -2421.8223,956.9081,45.2969, 52, 0, MAPICON_LOCAL); // bankomat 9
    SetPlayerMapIcon(playerid, 52, -1968.8274,416.4396,35.1719, 52, 0, MAPICON_LOCAL); // bankomat 10
    SetPlayerMapIcon(playerid, 52, -1981.7841,110.9044,27.6799, 52, 0, MAPICON_LOCAL); // bankomat 11
    SetPlayerMapIcon(playerid, 52, -2158.6157,-40.2369,35.3203, 52, 0, MAPICON_LOCAL); // bankomat 12
    SetPlayerMapIcon(playerid, 52, -2214.3025,454.5144,35.1719, 52, 0, MAPICON_LOCAL); // bankomat 13
    SetPlayerMapIcon(playerid, 52, -2430.0349,6.7178,35.3203, 52, 0, MAPICON_LOCAL); // bankomat 14
    SetPlayerMapIcon(playerid, 52, -2489.8931,-134.3176,25.6237, 52, 0, MAPICON_LOCAL); // bankomat 15
    //-------------------------------------------------------------
    SetPlayerColor(playerid, COLOR_WHITE);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    return 1;
    }
    public Nacitani3(playerid) // nacitani
    {
    LoadPlayerVehicle(playerid);
    LoadPlayerMafia(playerid);
    //------
    switch(Mafia[playerid][Hodnost])
    {
    case 1: PocetAssociate[Mafia[playerid][iD]]++;
    case 2: PocetCapo[Mafia[playerid][iD]]++;
    case 3: PocetConsigliere[Mafia[playerid][iD]]++;
    }
    SCM(playerid, COLOR_WHITE, "Účet načten!");
    Information[playerid][isLogged] = true;
    Nacitani[playerid] = false;
    SpawnPlayer(playerid);
    //-------------------------------------------------------------
    Log(playerid, "Hrac se prihlasil a jeho udaje byly nacteny");
    return 1;
    }
    

     

    Ruzny stocky ktery souvisej s ukladanim a nacitanim

    stock SavePlayerVehicle(playerid) // ukladani
    {
    new string[256];
    format(string, sizeof(string), "Philadelphia/Accounts/%s.sav", PlayerName(playerid));
    new File:SaveFile = fopen(string, io_write);
    if(SaveFile)
    {
    new napis[300];
    format(napis, sizeof(napis), "AutoID=%d", PlayerCar[playerid][iD]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoPoziceX=%f", PlayerCar[playerid][PoziceX]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoPoziceY=%f", PlayerCar[playerid][PoziceY]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoPoziceZ=%f", PlayerCar[playerid][PoziceZ]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoAngle=%f", PlayerCar[playerid][Angle]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoBarva1=%d", PlayerCar[playerid][barva1]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoBarva2=%d", PlayerCar[playerid][barva2]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoMajitel=%s", PlayerCar[playerid][Majitel]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "AutoZamknute=%s", PlayerCar[playerid][Zamknute]); fwrite(SaveFile, napis);
    fclose(SaveFile);
    }
    }
    stock SavePlayerMafia(playerid) // ukladani
    {
    new string[256];
    format(string, sizeof(string), "Philadelphia/Accounts/%s.sav", PlayerName(playerid));
    new File:SaveFile = fopen(string, io_write);
    if(SaveFile)
    {
    new napis[100];
    format(napis, sizeof(napis), "MafiaID=%d", Mafia[playerid][iD]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "MafiaSidlo=%d", Mafia[playerid][sidlo]); fwrite(SaveFile, napis);
    format(napis, sizeof(napis), "MafiaHodnost=%d", Mafia[playerid][Hodnost]); fwrite(SaveFile, napis);
    fclose(SaveFile);
    }
    }
    stock LoadPlayerMafia(playerid) // nacitani
    {
    new path[256];
    format(path, sizeof(path), soubor, PlayerConnectName(playerid));
    new File:LogFile = fopen(path, io_read);
    if(LogFile)
    {
    new key[256], val[256], Data[256];
    while(fread(LogFile, Data, sizeof(Data)))
    {
    key = file_GetKey(Data);
    	 if(strcmp(key, "MafiaID", true) == 0) { val = file_GetValue(Data); Mafia[playerid][iD] = strval(val); }
    	 if(strcmp(key, "MafiaSidlo", true) == 0) { val = file_GetValue(Data); Mafia[playerid][sidlo] = strval(val); }
    	 if(strcmp(key, "MafiaHodnost", true) == 0) { val = file_GetValue(Data); Mafia[playerid][Hodnost] = strval(val); }
    	 fclose(LogFile);
    }
    }
    }
    stock LoadPlayerVehicle(playerid) // nacitani
    {
    new path[256];
    format(path, sizeof(path), soubor, PlayerConnectName(playerid));
    new File:LogFile = fopen(path, io_read);
    if(LogFile)
    {
    new key[256], val[256], Data[256];
    while(fread(LogFile, Data, sizeof(Data)))
    {
    key = file_GetKey(Data);
    	 if(strcmp(key, "AutoModel", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][Model] = strval(val); }
    	 if(strcmp(key, "AutoID", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][iD] = strval(val); }
    	 if(strcmp(key, "AutoPoziceX", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][PoziceX] = strval(val); }
    	 if(strcmp(key, "AutoPoziceY", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][PoziceY] = strval(val); }
    	 if(strcmp(key, "AutoPoziceZ", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][PoziceZ] = strval(val); }
    	 if(strcmp(key, "AutoAngle", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][Angle] = strval(val); }
    	 if(strcmp(key, "AutoBarva1", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][barva1] = strval(val); }
    	 if(strcmp(key, "AutoBarva2", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][barva2] = strval(val); }
    	 if(strcmp(key, "AutoMajitel", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][Majitel] = strval(val); }
    	 if(strcmp(key, "AutoZamknute", true) == 0) { val = file_GetValue(Data); PlayerCar[playerid][Zamknute] = strval(val); }
    	 fclose(LogFile);
    	 SellingCars[PlayerCar[playerid][iD]][Prodej] = false;
    }
    }
    }
    stock file_GetKey(line[])
    {
    new keyRes[256];
    keyRes[0] = 0;
    if(strfind(line, "=", true) == -1) return keyRes;
    strmid(keyRes, line, 0, strfind(line, "=", true), sizeof(keyRes));
    return keyRes;
    }
    stock file_GetValue(line[])
    {
    new valRes[256];
    valRes[0] = 0;
    if(strfind(line, "=", true) == -1) return valRes;
    strmid(valRes, line, strfind(line, "=", true)+1, strlen(line), sizeof(valRes));
    return valRes;
    }
    
  3. Cau, mam takovej problem, ze kdyz se pripojim a chci se zaregistrovat nebo prihlasit tak to obcas funguje dobre ale vetsinou mi to hned po zadani hesla spadne... vubec nechapu proc, diky za kazdou pomoc

     

    OnPlayerConnect

     

    public OnPlayerConnect(playerid)
    {
    KontrolaJmena(playerid, PlayerConnectName(playerid));
    //-----------------------------------------------------------
    new path[256];
    format(path, sizeof(path), soubor, PlayerConnectName(playerid));
    if(fexist(path))
    {
     SPD(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prihlaseni", "{FFFFFF}Vítejte zpátky na serveru {ffd700}Mafia Roleplay{FFFFFF} přihlašte se zadáním hesla prosím!\n\nVytvořili:\n{FFFFFF}Pawner a maper: {00ffff}SweetCZ\n{FFFFFF}Testeři: {00ffff}TheTotifus, Ar3st, MiskulunCZ, Skrilex\n{FFFFFF}Webmaster: {00ffff}ManSlayer", "Ok", "Odejit");
    }
    else
    {
    SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registrace", "{FFFFFF}Vítejte na serveru {ffd700}Mafia Roleplay{FFFFFF} zaregistrujte se zadáním hesla prosím!\n\nVytvořili:\n{FFFFFF}Pawner a maper: {00ffff}SweetCZ\n{FFFFFF}Testeři: {00ffff}TheTotifus, Ar3st, MiskulunCZ, Skrilex\n{FFFFFF}Webmaster: {00ffff}ManSlayer", "Ok", "Zavrit");
    }
    //------------------------------------------------------------
    new string[128];
    format(string, sizeof(string), "Hráč {33CCFF}%s {FFFFFF}se připojil na server!", PlayerName(playerid));
    SCMTA(COLOR_WHITE, string);
    //------------------------------------------------------------
    //PlayAudioStreamForPlayer(playerid, "http://ice.abradio.cz:8000/fajn128.mp3");
    //------------------------------------------------------------
    new str[50];
    format(str, sizeof(str), "~y~Vitejte ~n~~w~%s", PlayerName(playerid));
    GameTextForPlayer(playerid, str, 3000, 1);
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    SCM(playerid, -1, "");
    //-------------------------------------------------------------
    MiseRozvazecZbozi[playerid] = false;
    MiseElektrikar[playerid] = false;
    MisePopelar[playerid] = false;
    MiseRidicAutobusu[playerid] = false;
    Autoskola[playerid] = false;
    PrvniPripojeni[playerid] = true;
    Zraneny[playerid] = false;
    Spawnuty[playerid] = false;
    ZobrazeniTD[playerid] = false;
    SpustitTimerUmrtiHrace[playerid] = false;
    SuperStunts[playerid] = false;
    FastShip[playerid] = false;
    BezPotreb[playerid] = true;
    PolicistaPrace[playerid] = false;
    HasicPrace[playerid] = false;
    LekarPrace[playerid] = false;
    TaxikarPrace[playerid] = false;
    OznamovaciText[playerid] = false;
    Zachraneny[playerid] = false;
    ProdavajiciAuto[playerid] = false;
    KoureniMarihuany[playerid] = false;
    Nacitani[playerid] = false;
    CasOdPripojeni[playerid] = 0;
    //--------------- auta ve hrach ------------------------
    car[playerid] = CreateVehicle(451, 2254.8755,-1383.6632,23.8422, 0, 1, 1, 1800);
    boat[playerid] = CreateVehicle(446, 2208.2642,3016.8450,-0.1835,80.4183, 1, 1, 1800);
    //--
    new pri[128];
    gettime(hodinar, minutar, sekundar);
    getdate(rokr, mesicr, denr);
    format(pri, sizeof(pri), "Hrac se pripojil [%d:%d:%d | %d.%d.%d]", hodinar, minutar, sekundar, denr, mesicr, rokr);
    Log(playerid, pri);
    //--
    wc_td[playerid] = TextDrawCreate(500,109," ");
    TextDrawLetterSize(wc_td[playerid],0.550000,1.000000);
    TextDrawBackgroundColor(wc_td[playerid],COLOR_PINK);
    TextDrawFont(wc_td[playerid],3);
    TextDrawUseBox(wc_td[playerid],1);
    TextDrawBoxColor(wc_td[playerid],0xFF0000FF);
    TextDrawTextSize(wc_td[playerid],607.000000,119.000000);
    TextDrawSetProportional(wc_td[playerid],1);
    TextDrawSetShadow(wc_td[playerid],1);
    //---
    jidlo_td[playerid] = TextDrawCreate(500,122," ");
    TextDrawLetterSize(jidlo_td[playerid],0.550000,1.000000);
    TextDrawBackgroundColor(jidlo_td[playerid],0x000000FF);
    TextDrawFont(jidlo_td[playerid],3);
    TextDrawUseBox(jidlo_td[playerid],1);
    TextDrawBoxColor(jidlo_td[playerid],COLOR_GREEN);
    TextDrawTextSize(jidlo_td[playerid],607.000000,132.000000);
    TextDrawSetProportional(jidlo_td[playerid],1);
    TextDrawSetShadow(jidlo_td[playerid],1);
    //---
    piti_td[playerid] = TextDrawCreate(500,135," ");
    TextDrawLetterSize(piti_td[playerid],0.550000,1.000000);
    TextDrawBackgroundColor(piti_td[playerid],0x000000FF);
    TextDrawFont(piti_td[playerid],3);
    TextDrawUseBox(piti_td[playerid],1);
    TextDrawBoxColor(piti_td[playerid],COLOR_BLUE);
    TextDrawTextSize(piti_td[playerid],607.000000,145.000000);
    TextDrawSetProportional(piti_td[playerid],1);
    TextDrawSetShadow(piti_td[playerid],1);
    //---
    spanek_td[playerid] = TextDrawCreate(500,148," ");
    TextDrawLetterSize(spanek_td[playerid],0.550000,1.000000);
    TextDrawBackgroundColor(spanek_td[playerid],0x000000FF);
    TextDrawFont(spanek_td[playerid],3);
    TextDrawUseBox(spanek_td[playerid],1);
    TextDrawBoxColor(spanek_td[playerid],COLOR_ORANGE);
    TextDrawTextSize(spanek_td[playerid],607.000000,158.000000);
    TextDrawSetProportional(spanek_td[playerid],1);
    TextDrawSetShadow(spanek_td[playerid],1);
    //---
    zavislost_td[playerid] = TextDrawCreate(500,161," ");
    TextDrawLetterSize(zavislost_td[playerid],0.550000,1.000000);
    TextDrawBackgroundColor(zavislost_td[playerid],0x000000FF);
    TextDrawFont(zavislost_td[playerid],3);
    TextDrawUseBox(zavislost_td[playerid],1);
    TextDrawBoxColor(zavislost_td[playerid],COLOR_GREY);
    TextDrawTextSize(zavislost_td[playerid],607.000000,171.000000);
    TextDrawSetProportional(zavislost_td[playerid],1);
    TextDrawSetShadow(zavislost_td[playerid],1);
    return 1;
    }
    

     

     

    OnDialogResponse

     

    new path[128];
    format(path, sizeof(path), soubor, PlayerConnectName(playerid));
    if(dialogid == DIALOG_REGISTER)
    {
    if(response)
    {
    new pwlength = strlen(inputtext);
    if(pwlength > 0)
    {
     new string[129];
    new File:RegFile = fopen(path, io_write);
    if(RegFile)
    {
     strmid(Information[playerid][Heslo], inputtext, 0, strlen(inputtext), 255);
     format(string, sizeof(string), "Heslo=%s", Information[playerid][Heslo]);
     Information[playerid][NewRegister] = true;
     Mafia[playerid][iD] = 0;
     Mafia[playerid][Hodnost] = 0;
     Mafia[playerid][sidlo] = 0;
     fwrite(RegFile, string);
     fclose(RegFile);
     format(MafiaName[Mafia[playerid][iD]],24,"None");
     Log(playerid, "Hrac se zaregistroval");
    }
    }
    else
    {
    	 SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registrace", "{FFFFFF}Zadejte heslo prosím!", "Ok", "Zavrit");
    }
    }
    }
    if(dialogid == DIALOG_LOGIN)
    {
    if(response)
    {
    new pwlength = strlen(inputtext);
    if(pwlength > 0)
    {
     new PassData[256], keytmp[256], valtmp[256];
    new File:LogFile = fopen(path, io_read);
    if(LogFile)
    {
     fread(LogFile, PassData, sizeof(PassData));
     keytmp = file_GetKey( PassData );
     if(strcmp(keytmp, "Heslo", true) == 0)
     {
     valtmp = file_GetValue(PassData);
     strmid(Information[playerid][Heslo], valtmp, 0, strlen(valtmp)-1, 32);
     }
     if(strcmp(Information[playerid][Heslo], inputtext, true) == 0)
     {
     Nacitani[playerid] = true;
     Information[playerid][NewRegister] = false;
     //------
     SetTimerEx("Nacitani1", 2000, 0, "i", playerid);
     SetTimerEx("Nacitani2", 4000, 0, "i", playerid);
     SetTimerEx("Nacitani3", 6000, 0, "i", playerid);
     }
    }
    	 else
    	 {
    		 SPD(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prihlaseni", "{FFFFFF}Zadal jsi špatné heslo, zadej ho prosím znovu!", "Ok", "Odejit");
    	 }
    }
    else
     {
    	 SPD(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prihlaseni", "{FFFFFF}Zadejte heslo prosím!", "Ok", "Odejit");
     }
    }
    else
    {
     Kick(playerid);
    }
    }
    

     

     

    Stocky

     

    stock KontrolaJmena(playerid, name[])
    {
    new ch = name[0];
    if(strfind(name, "_") != -1)
    {
     if(ch >= 'A' && ch <= 'Z')
     {
    	 for(new i=0, j=strlen(name); i < j; i++)
    	 {
    		 if((name[i] >= 0) && (name[i] <= 9))
    	 {
    		 Varovani(playerid, "Na tomto serveru se hraje roleplay a proto musíš mít RP jméno.");
    		 Varovani(playerid, "Ve tvém jméně nesmí být žádná čísla!");
    		 Varovani(playerid, "Příklad: Vito_Scaletta");
    		 Kick(playerid);
    	 }
    		 if(!strfind(name[i], "_"))
    		 {
    			 name[++i];
    			 if(name[i] >= 'A' && name[i] <= 'Z') return 1;
    			 else
    			 {
    				 Varovani(playerid, "Na tomto serveru se hraje roleplay a proto musíš mít RP jméno.");
    				 Varovani(playerid, "Tvé příjmení musí začínat velkým písmenem!");
    				 Varovani(playerid, "Příklad: Vito_Scaletta");
    				 Kick(playerid);
    			 }
    		 }
    		 else continue;
    	 }
     }
     else
     {
    	 Varovani(playerid, "Na tomto serveru se hraje roleplay a proto musíš mít RP jméno.");
    	 Varovani(playerid, "Tvé křestní jméno musí začínat velkým písmenem!");
    	 Varovani(playerid, "Příklad: Vito_Scaletta");
    	 Kick(playerid);
     }
    }
    else
    {
     Varovani(playerid, "Na tomto serveru se hraje roleplay a proto musíš mít RP jméno.");
     Varovani(playerid, "Mezi křestním jménem a příjmením musí být tento znak: _");
     Varovani(playerid, "Příklad: Vito_Scaletta");
     Kick(playerid);
    }
    return true;
    }
    stock file_GetKey(line[])
    {
    new keyRes[256];
    keyRes[0] = 0;
    if(strfind(line, "=", true) == -1) return keyRes;
    strmid(keyRes, line, 0, strfind(line, "=", true), sizeof(keyRes));
    return keyRes;
    }
    stock file_GetValue(line[])
    {
    new valRes[256];
    valRes[0] = 0;
    if(strfind(line, "=", true) == -1) return valRes;
    strmid(valRes, line, strfind(line, "=", true)+1, strlen(line), sizeof(valRes));
    return valRes;
    }
    

     

  4. Parkour mapy jsou celkem dobry, bavilo me to skakat, ale vubec jsem nevedel co mam na tom serveru delat. Kdybych nemel sobeit a neportoval bych se k objektum sam, tak bych nevedel kde to hledat. Mod vypada celej takovej prazdnej. Pridej pri pripojeni nejaky zpravy o tom kam se muzes portovat, co muzes v modu delat atp..

    • Líbí se mi to! (+1) 1
  5. new bool:ShowedPlayerDialog[MAX_PLAYERS];
    
    stock ShowPlayerDialogEx(playerid, id, style, lis[], mess[], button1[], button2[])
    {
    if(ShowedPlayerDialog[playerid] == true) return false;
    ShowPlayerDialog(playerid, id, style, lis, mess, button1, button2);
    ShowedPlayerDialog[playerid] = true;
    return true;
    }
    
    a uplne na zacatek OnDialogResponse: 
    ShowedPlayerDialog[playerid] = false;
    
    a pouzivat ShowPlayerDialogEx 

  6. Thema je Free

    Domena je Free

     

    Ale nejde tu oto ale o sevrer

    Piste co sa vam nepaci co chiba a co treba dat prec

    server je na ho*no..

    web + server + majitel

    chybi inteligence majitele a treba dat pryc server

×
×
  • Create New...