Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.
Üzenetek - huhboy
Oldalak: 1 ... 37 38 [39] 40 41 ... 60
571
« Dátum: 2014. április 04. - 22:56:44 »
ÜDv! Nemrég készítettem egy egyszerû xp rendszert, amibõl a végén egy xp include lett..... Szükséges fájlok: scriptfiles-ban egy Users mappa. Összesen 30 szint van, 99-ig növelhetõ. ( A szintek eléréséhez szükséges xp szám az include-ban van megadva) Az include automatikusan létrehoz egy kis textdrawot a map felett, ami mutatja az xp számot, és a szintet. Biztos van, akinek jól jön Mod elejére: #include <xpinc> funkciók: GiveXp(playerid, XP);// az XP az érték SetXp(playerid, XP); //az XP szintén az érték GetPlayerXP(playerid); GetPlayerXpLevel(playerid);
a Módba/fs-be behelyezendõ dolgok: /*Az OnGameModeInit alá:*/ betoltendo(); /*OnPlayerConnect(playerid) alá:*/ Connect_xp(playerid); /*OnPlayerDisconnect(playerid) alá: */ Disconnect_xp(playerid);
a kis textdraw, ami azért nincs túlszerkesztgetve, mert aki akar, az úgyis csinál olyat, amilyet szeretne http://kepfeltoltes.hu/140405/xp_www.kepfeltoltes.hu_.jpg[/img] Letöltés: http://www.solidfiles.com/d/56c1c173d9/xpinc.incINC: #include <a_samp> #include <sscanf> #include <dini> //=================================================================================== //======================================scriptbe===================================== //=================================================================================== /* OnGameModeInit: betoltendo(); OnPlayerConnect: Connect_xp(playerid); OnPlayerDisconnect: Disconnect_xp(playerid); */ #define MAX_XP_LEVEL 99 #define Szin_RED 0xFF0000AA #define Szin_YELLOW 0xFFFF00AA #define zoold 0x00ff00AA new PlayerText:XPTD[MAX_PLAYERS]; stock betoltendo() { SetTimer(\"XPUpdate\", 200, 1); SetTimer(\"XP_Level\", 200, 1); return 1; } //=================================================================================== //=========================================Szintek=================================== //=================================================================================== forward XP_Level(playerid); public XP_Level(playerid) { if(GetPVarInt(playerid, \"XP\") < 100) SetPVarInt(playerid, \"xplvl\", 1); else if(GetPVarInt(playerid, \"XP\") < 250 && GetPVarInt(playerid, \"XP\") > 99) SetPVarInt(playerid, \"xplvl\", 2); else if(GetPVarInt(playerid, \"XP\") < 500 && GetPVarInt(playerid, \"XP\") > 244) SetPVarInt(playerid, \"xplvl\", 3); else if(GetPVarInt(playerid, \"XP\") < 800 && GetPVarInt(playerid, \"XP\") > 499) SetPVarInt(playerid, \"xplvl\", 4); else if(GetPVarInt(playerid, \"XP\") < 1200 && GetPVarInt(playerid, \"XP\") > 799) SetPVarInt(playerid, \"xplvl\", 5); else if(GetPVarInt(playerid, \"XP\") < 1800 && GetPVarInt(playerid, \"XP\") > 1199) SetPVarInt(playerid, \"xplvl\", 6); else if(GetPVarInt(playerid, \"XP\") < 2500 && GetPVarInt(playerid, \"XP\") > 1799) SetPVarInt(playerid, \"xplvl\", 7); else if(GetPVarInt(playerid, \"XP\") < 3200 && GetPVarInt(playerid, \"XP\") > 2499) SetPVarInt(playerid, \"xplvl\", ; else if(GetPVarInt(playerid, \"XP\") < 4000 && GetPVarInt(playerid, \"XP\") > 3199) SetPVarInt(playerid, \"xplvl\", 9); else if(GetPVarInt(playerid, \"XP\") < 4800 && GetPVarInt(playerid, \"XP\") > 3999) SetPVarInt(playerid, \"xplvl\", 10); else if(GetPVarInt(playerid, \"XP\") < 5900 && GetPVarInt(playerid, \"XP\") > 4799) SetPVarInt(playerid, \"xplvl\", 11); else if(GetPVarInt(playerid, \"XP\") < 7000 && GetPVarInt(playerid, \"XP\") > 5899) SetPVarInt(playerid, \"xplvl\", 12); else if(GetPVarInt(playerid, \"XP\") < 9000 && GetPVarInt(playerid, \"XP\") > 6999) SetPVarInt(playerid, \"xplvl\", 13); else if(GetPVarInt(playerid, \"XP\") < 11000 && GetPVarInt(playerid, \"XP\") > 8999) SetPVarInt(playerid, \"xplvl\", 14); else if(GetPVarInt(playerid, \"XP\") < 13500 && GetPVarInt(playerid, \"XP\") > 10999) SetPVarInt(playerid, \"xplvl\", 15); else if(GetPVarInt(playerid, \"XP\") < 16000 && GetPVarInt(playerid, \"XP\") > 13499) SetPVarInt(playerid, \"xplvl\", 16); else if(GetPVarInt(playerid, \"XP\") < 17000 && GetPVarInt(playerid, \"XP\") > 15999) SetPVarInt(playerid, \"xplvl\", 17); else if(GetPVarInt(playerid, \"XP\") < 20000 && GetPVarInt(playerid, \"XP\") > 16999) SetPVarInt(playerid, \"xplvl\", 18); else if(GetPVarInt(playerid, \"XP\") < 23000 && GetPVarInt(playerid, \"XP\") > 19999) SetPVarInt(playerid, \"xplvl\", 19); else if(GetPVarInt(playerid, \"XP\") < 28000 && GetPVarInt(playerid, \"XP\") > 22999) SetPVarInt(playerid, \"xplvl\", 20); else if(GetPVarInt(playerid, \"XP\") < 35000 && GetPVarInt(playerid, \"XP\") > 27999) SetPVarInt(playerid, \"xplvl\", 21); else if(GetPVarInt(playerid, \"XP\") < 40000 && GetPVarInt(playerid, \"XP\") > 34999) SetPVarInt(playerid, \"xplvl\", 22); else if(GetPVarInt(playerid, \"XP\") < 45000 && GetPVarInt(playerid, \"XP\") > 39999) SetPVarInt(playerid, \"xplvl\", 23); else if(GetPVarInt(playerid, \"XP\") < 50000 && GetPVarInt(playerid, \"XP\") > 44999) SetPVarInt(playerid, \"xplvl\", 24); else if(GetPVarInt(playerid, \"XP\") < 52000 && GetPVarInt(playerid, \"XP\") > 49999) SetPVarInt(playerid, \"xplvl\", 25); else if(GetPVarInt(playerid, \"XP\") < 58000 && GetPVarInt(playerid, \"XP\") > 51999) SetPVarInt(playerid, \"xplvl\", 26); else if(GetPVarInt(playerid, \"XP\") < 62000 && GetPVarInt(playerid, \"XP\") > 57999) SetPVarInt(playerid, \"xplvl\", 27); else if(GetPVarInt(playerid, \"XP\") < 70000 && GetPVarInt(playerid, \"XP\") > 61999) SetPVarInt(playerid, \"xplvl\", 28); else if(GetPVarInt(playerid, \"XP\") < 80000 && GetPVarInt(playerid, \"XP\") > 69999) SetPVarInt(playerid, \"xplvl\",29); else if(GetPVarInt(playerid, \"XP\") < 100000 && GetPVarInt(playerid, \"XP\") > 79999) SetPVarInt(playerid, \"xplvl\", 30); return 1; } forward XPUpdate(); public XPUpdate() { for(new i=0;i<MAX_PLAYERS;i++) { new string[256]; format(string, sizeof(string), \"%d/XP~n~%d/LvL\", GetPVarInt(i, \"XP\"), GetPVarInt(i, \"xplvl\")); PlayerTextDrawSetString(i,XPTD, string); } return true; } stock Connect_xp(playerid) { XPTD[playerid] = CreatePlayerTextDraw(playerid,10.000, 320.000, \"x/XP~n~x/LvL\"); PlayerTextDrawLetterSize(playerid,XPTD[playerid], 0.5, 1.0); PlayerTextDrawColor(playerid,XPTD[playerid], zoold); SetPVarInt(playerid, \"XP\", 0); //XP[playerid]=0; SetPVarInt(playerid, \"xplvl\", 0); //lvl[playerid]=0; new file[128], vardas[128]; GetPlayerName(playerid, vardas, 128); format(file,128,\"Users/%s.ini\",vardas); SetPVarInt(playerid, \"XP\", dini_Int(file, \"XP\")); SetPVarInt(playerid, \"xplvl\", dini_Int(file, \"LVL\")); return true; } stock Disconnect_xp(playerid) { new file[128], vardas[128]; GetPlayerName(playerid, vardas, 128); format(file,128,\"Users/%s.ini\",vardas); if(!dini_Exists(file)) { dini_Create(file); } dini_IntSet(file,\"XP\",GetPVarInt(playerid, \"XP\")); dini_IntSet(file,\"LVL\",GetPVarInt(playerid, \"xplvl\")); return true; } stock GiveXp(playerid, xp) { SetPVarInt(playerid, \"XP\", GetPVarInt(playerid, \"XP\") + xp); return true; } stock SetXp(playerid, xp) { SetPVarString(playerid, \"XP\", xp); return 1; } stock GetPlayerXP(playerid) return GetPVarInt(playerid, \"XP\"); stock GetPlayerXpLevel(playerid) return GetPVarInt(playerid, \"xplvl\"); [gmod]Javítottam a tageket tagekre![/gmod]
572
« Dátum: 2014. április 04. - 19:37:29 »
így gondolod? #include <a_samp> #include <zcmd> beirva[MAX_PLAYERS]; CMD:parancs(playerid) { SendClientMessage(playerid, -1, \"A parancs befejezéséhez írd: /acceptparancs\"); beirva[playerid] = 1; return 1; } CMD:acceptparancs(playerid) { if(beirva[playerid] == 0) return 0; // így nem ír ki semmit, és nem történik semmi, amíg a másik parancsot be nem írja if(beirva[playerid] == 1) { //parancs többi része beirva[playerid] = 0; //ezzel pedig újra bekell majd írnia az elsõ parancsot, ha mégegyszer használni akarja. } return 1; }
574
« Dátum: 2014. április 02. - 09:34:16 »
hát..belenéztem. ami hibaként szemet szúrt, az ez: public OnPlayerRequestClass(playerid, classid) { new file[256]; GetPlayerName(playerid,nev,sizeof(nev)); format(file,sizeof(file),\"/Frakcio/%s.ini\",nev); new string[256]; if(!fexist(file)) { format(string, sizeof string, \"Üdv %s! \\nKérjük regisztrálj! \\n\\nAdd meg a kívánt jelszavadat!\", nev); ShowPlayerDialog(playerid,DIALOG_REGISZTRACIO, DIALOG_STYLE_INPUT, \"Regisztráció\", string, \"Regisztráció\", \"Kilépés\"); } if(fexist(file)) { format(string, sizeof string, \"Üdv %s! \\nKérjük jelentkezz be! \\n\\nÍrd be a jelszavadat!\", nev); ShowPlayerDialog(playerid, DIALOG_BEJELENTKEZES, DIALOG_STYLE_INPUT, \"Bejelentkezés\", string, \"Bejelentkezés\", \"Kilépés\"); } return 1; } ezzel csak az a baj, hogy a skinváltónál akárhányszor balra, vagy jobbra váltod a skin-t, annyiszor fogja mutatni, ami szerintem nem jó dolog...én áttenném ez alá: public OnPlayerRequestSpawn(playerid) //vagy egybõl a csatlakozászoz public OnPlayerConnect(playerid)
másik..... akárhányszor csak meghalsz, és lespawnolsz, mindig felcsatlakozol? szintén erre van az OnPlayerConnect public OnPlayerSpawn(playerid)//ez helyett OnPlayerConnect(playerid) { new string[128]; GetPlayerName(playerid,nev,sizeof(nev)); format(string,sizeof(string),\"%s csatlakozott a szerverre!\",nev); SendClientMessageToAll(KEK,string); return 1; }
575
« Dátum: 2014. március 28. - 12:50:33 »
%.1f ez kell neked... de ha nem akarod hogy legyen .0 akkor meg ez:
%.0f
így, hogy elé írom a pontot, így mûködik köszii zárok
576
« Dátum: 2014. március 28. - 00:52:23 »
Hali. mivel határozom meg, hogy az alábbi képen a bal alsó sarokban a jármû épségének értékét ne \"1000.000\"-ban adja meg, hanem pl csak 1000.0-ban? new Float:VehHealth; GetVehicleHealth(GetPlayerVehicleID(i), VehHealth); new string[256]; format(string, sizeof(string), \"%f\", VehHealth); TextDrawSetString(Epseg, string); http://kepfeltoltes.hu/140328/sa-mp-012_www.kepfeltoltes.hu_.png[/img]
577
« Dátum: 2014. március 27. - 18:51:09 »
mindegy...rákötöttem egy 2 másodperces timert, az megoldotta azért kössz
578
« Dátum: 2014. március 27. - 18:40:51 »
hali. Ezzel mi lehet a gond? ugyanis a játékost bedobja az autóba, viszont nem változtatja meg a helyzetét, vagyis nem teleportálja oda. ötlet? forward DerbySpawn(playerid); public DerbySpawn(playerid) { if(derbymap == 1) { switch(random(7)) { case 0: SetPlayerPos(playerid, 3244.0334, -1213.3790, 70.8554), SetPlayerFacingAngle(playerid,180.0), Autoba(playerid); case 1: SetPlayerPos(playerid, 3293.2686, -1387.0214, 84.0554), SetPlayerFacingAngle(playerid,90.0), Autoba(playerid); case 2: SetPlayerPos(playerid, 3265.8931, -1362.3733, 84.0285), SetPlayerFacingAngle(playerid,0.0), Autoba(playerid); case 3: SetPlayerPos(playerid, 3229.2837, -1337.8181, 84.0554), SetPlayerFacingAngle(playerid,90.0), Autoba(playerid); case 4: SetPlayerPos(playerid, 3196.3582, -1370.4860, 70.8554), SetPlayerFacingAngle(playerid,180.0), Autoba(playerid); case 5: SetPlayerPos(playerid, 3195.8088, -1278.7086, 70.8554), SetPlayerFacingAngle(playerid,270.0), Autoba(playerid); case 6: SetPlayerPos(playerid, 3329.9385, -1371.3793,7 0.8554), SetPlayerFacingAngle(playerid,90.0), Autoba(playerid); } } return 1; } stock Autoba(playerid) { new Float:X, Float:Y, Float:Z, Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid, A); new vid; vid = CreateVehicle(444, X, Y, Z+1, A, 0, 1, 180); PutPlayerInVehicle(playerid, vid, 0); }
579
« Dátum: 2014. március 26. - 12:10:29 »
egy észrevétel... ha kiveszed az OnGameModeInit alól a cuccot, és kiveszed az inclued-ot a modból, akkor már nem védi. Teháát...szerintem ez még így kevés. de ez csak egy észrevétel.
Ki az a hülye, aki pwnt tölt fel a hostos szerverre? [/quote] soroljak szerver neveket? xd köztük az enyém is...ugyanis aki gyakran húzza újra a gépét, annak így egyszerûbb
580
« Dátum: 2014. március 26. - 00:31:52 »
egy észrevétel... ha kiveszed az OnGameModeInit alól a cuccot, és kiveszed az inclued-ot a modból, akkor már nem védi. Teháát...szerintem ez még így kevés. de ez csak egy észrevétel.
581
« Dátum: 2014. március 24. - 23:20:35 »
és ha így próbálod? dcmd_stat(playerid,params[]) { new id,Float:rat,Float:hp,Float:arm; if(sscanf(params,\"u\",id)) { rat=PlayerInfo[id][Kills]/PlayerInfo[id][Deaths]; GetName(id,Name); GetPlayerHealth(id,hp); GetPlayerArmour(id,arm); fpm(playerid,STR,-1,\"{FF0000}[{00FF00}INFO{FF0000}]: {F7FF00}%s{A2A1A1}(%d) Kills:%d | Deaths: %d | Ratio: %0.2f | HP: %d | ARM: %d | ping: %d\",Name,id,PlayerInfo[id][Kills],PlayerInfo[id][Deaths],rat,floatround(hp),floatround(arm),GetPlayerPing(id)); } else { rat=PlayerInfo[playerid][Kills]/PlayerInfo[playerid][Deaths]; GetName(playerid,Name); GetPlayerHealth(playerid,hp); GetPlayerArmour(playerid,arm); fpm(playerid,STR,-1,\"{FF0000}[{00FF00}INFO{FF0000}]: {F7FF00}%s{A2A1A1}(%d) Kills:%d | Deaths: %d | Ratio: %0.2f | HP: %d | ARM: %d | ping: %d\",Name,playerid,PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths],rat,floatround(hp),floatround(arm),GetPlayerPing(playerid)); } return 1; }
582
« Dátum: 2014. március 23. - 23:02:23 »
akkor is lehet ez a gond, ha include-olod a zcmd-t....akkor a többi nem fog mûködni.
583
« Dátum: 2014. március 23. - 22:58:16 »
Üdv. Lényegében egy kódra lenne szükségem, ami arról szól, hogy amikor beírod a parancsot, létrehozza a megadott spawnpontok, amik 4 pontból állnak (x, y, z, facing angle) közül random módon a jármûvet, és a PutPlayerInVehicle-lel bele is tegye. Nekem csak úgy jött össze, hogy a többi autót is létrehozza :S A segítséget megköszönöm
584
« Dátum: 2014. március 20. - 23:29:29 »
hát..khm xd ez a koordináta 25,-317.8129,2690.8958 nincs ennek a koordinátának 5 pontos közelében xd -962.0,2715.90,45.60 szóval vagy ilyen messzire akarod elvinni azt a kaput, vagy állj be a már meglévõ kapud elé, mentsd le a koordinátáit, és azt írd az IsPlayerInRangeOfPoint, és az 5-ös után....
585
« Dátum: 2014. március 20. - 23:26:15 »
Helló...nos. az én gondom most jelenleg az, hogy beenged a szerver, akármilyen jelszót is írok be....ötlet? /*ha kell még valami, bemásolom hozzá*/ else if(dialogid==DIALOG_LOGIN && !PlayerInfo[pLoggedIn][playerid]) { if(!response) { ShowPlayerLoginDialog(playerid); return 0; } if(inputtext[0] && DOF_CheckLogin(DOF_File(PlayerName[playerid]),inputtext)) { printf(\"[Felhasználó] %s (%d) Üdv a szerveren, Admin!\",PlayerName[playerid],playerid); LoadPlayerStats(playerid); LoadHouseHold(playerid); DOF_SetString(DOF_File(PlayerName[playerid]),\"ip\",PlayerIp[playerid]); SendClientMessageEx(playerid,COLOR_ADMIN,\"<$> Felhasználó Infó <#> Üdv a szervern, Admin!\"); if(PlayerInfo[pAdminLevel][playerid]) { format(string,sizeof(string),\" AdminSzint: %d\",PlayerInfo[pAdminLevel][playerid]); SendClientMessageEx(playerid,COLOR_ADMIN,string); } } else { PlayerInfo[pLoginsFailed][playerid]++; printf(\"[belépés] %s (%d) sikertelen bejelentkezése! [%d/%d]\",PlayerName[playerid],playerid,PlayerInfo[pLoginsFailed][playerid],MAX_FAILED_LOGINS); if(GetPlayerLanguage(playerid)==LANG_HU) format(string,sizeof(string),\"<$> -Hiba-<#> Hibás Jelszó! (%d/\"#MAX_FAILED_LOGINS\")\",PlayerInfo[pLoginsFailed][playerid]); else format(string,sizeof(string),\"<$> -Warning-<#> Login failed! (%d/\"#MAX_FAILED_LOGINS\")\",PlayerInfo[pLoginsFailed][playerid]); SendClientMessageEx(playerid,COLOR_WARNING,string); if(PlayerInfo[pLoginsFailed][playerid]>=MAX_FAILED_LOGINS) { if(GetPlayerLanguage(playerid)==LANG_HU) ServerKickPlayer(playerid,\"Sikertelen bejelentkezés\"); else ServerKickPlayer(playerid,\"Login failed\"); } else ShowPlayerLoginDialog(playerid); return 0; } }
[gmod]Javítottam helyetted a taget tagre![/gmod]
Oldalak: 1 ... 37 38 [39] 40 41 ... 60
|