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.
Témák - ninjo98
Oldalak: 1 [2] 3 4 ... 11
16
« Dátum: 2013. Július 23. - 15:41:07 »
Üdv itt van ez a parancs dialoggal: if (strcmp(\"/dialog\", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, DIALOG_DIALOG, DIALOG_STYLE_MSGBOX, \"Teleportálás\", \"Szeretnél elteleportálni?\\n\", \"Tele1\", \"Tele2\"); return 1; } Hogy tudom azt megcsinálni ha rákattintok a: Tele1: SetPlayerPos(playerid, 1935.5259,-1885.7679,13.5344); Tele2: SetPlayerPos(playerid, 1925.5225,-1885.7679,13.5344);
17
« Dátum: 2013. Július 23. - 14:53:23 »
Hogy lehet azt megoldani, hogy ha a játékos beírja /parancsletilt akkor letiltsa számára a parancsokat és a billentyûparancsokat se tudja használni (Pl.: 2es gomb autójavítás)
18
« Dátum: 2013. Július 22. - 18:13:37 »
Üdv! Ebben mit rontottam el? 222.sor : TextDrawSetString(Textdraw1[playerid], string5); Hibák: C:\\Games\\XY\\filterscripts\\XY.pwn(222) : error 028: invalid subscript (not an array or too many subscripts): \"Textdraw1\" C:\\Games\\XY\\filterscriptsXY.pwn(222) : warning 215: expression has no effect C:\\Games\\XY\\filterscripts\\XY.pwn(222) : error 001: expected token: \";\", but found \"]\" C:\\Games\\XY\\filterscripts\\XY.pwn(222) : error 029: invalid expression, assumed zero C:\\Games\\XY\\filterscripts\\XY.pwn(222) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 4 Errors.
new Text:Textdraw1; new string5[126];
19
« Dátum: 2013. Július 20. - 13:17:01 »
Üdv! Hogy oldhatom meg azt, hoyg beírom /nrg és rátesz a motorra? (nem mellém rakja hanem rátesz)
20
« Dátum: 2013. Július 19. - 21:17:17 »
Üdv! Hogy oldhatom meg azt, hogy van egy /fegyver parancs \"A\" pontba írom be AK-t ad \"B\" pontba írod be M4et kapsz? És persze mind2 nél /fegyver a parancs.. És írja ki: Nem vagy \"A\" pontban ezért nem kapsz AK-t
21
« Dátum: 2013. Július 18. - 09:00:32 »
Üdv! :Cry2: Számolni se akarom mennyi témát írtam ehhez a problémához! Mindent szépen lement kivéve az \'ExpLevelt\' összekeveri a sima EXP-vel Szóval mikor megszerzem az EXP uppolom a szintet figyeltem is a .init még játszottam minden rendben de mikor Disconnectelek akkor bezavarodik az Level ugyanaz lesz mint az EXP és úgy is tölti be.. Mi az oka? #include <a_samp> #include <dudb> #include <progress> new Text:ExpText[MAX_PLAYERS]; new Text:LevelText[MAX_PLAYERS]; new Text:Textdraw0; new Bar:bar[MAX_PLAYERS]; new Text3D:LevelLabel[MAX_PLAYERS]; new pfile[100]; //You can change these values. #define ExpForLevel 1000 //How much exp you need to pass a level. The Exp gets multiplied by the level. If you\'ve got 1000 total exp then for lvl 2 it will be 2000 #define MaxLevel 99 //The maximum level a player can achieve. #define UseProgBar // Define wheater to use íthe progress bar or not. Comment the line if you don\'t want a progress bar and leave like that if you do want a progress bar. #define ProgBarColor 0x0000FFFF //The experience bar\'s color. #define TextLabelColor 0x00FFFFFF // The textlabel\'s color. #define CashForLevelUp 300 //This is the cash you get for levelling up. It gets multiplied by the level you achieved and one more time by a number you define. #define CashMultiplier 1 //This multiplies the Cash * Level achieved by the number you want. #define GameTextStyle 4 //This defines the GameText\'s style used for the GivePlayerExp function. #define GameTextTime 3000 //This defines the time for which the GameText for the GivePlayerExp function will be visible #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, \"\")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #pragma unused strtok #pragma unused ret_memcpy //Declaring New //new nev[MAX_PLAYER_NAME]; //The function which gives exp. Usage: GivePlayerExp(playerid, ammount, reason); stock GivePlayerExp(playerid, exp, reason[]) { new string2[126], string3[126], string4[126]; format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pName(playerid)); dini_IntSet(pfile, \"Exp\", dini_Int(pfile, \"Exp\") +exp); if (dini_Int(pfile, \"Exp\") >= dini_Int(pfile, \"TotalExp\")) { if (dini_Int(pfile, \"ExpLevel\") < MaxLevel) { while (dini_Int(pfile, \"Exp\") >= dini_Int(pfile, \"TotalExp\")) { dini_IntSet(pfile, \"Exp\", dini_Int(pfile, \"Exp\") - dini_Int(pfile, \"TotalExp\")); dini_IntSet(pfile, \"ExpLevel\", dini_Int(pfile, \"ExpLevel\") + 1); dini_IntSet(pfile, \"TotalExp\", dini_Int(pfile, \"ExpLevel\") * ExpForLevel); format(string3, sizeof(string3), \"Level: %02d\",dini_Int(pfile, \"ExpLevel\")); TextDrawSetString(LevelText[playerid], string3); GivePlayerMoney(playerid, CashForLevelUp * dini_Int(pfile, \"ExpLevel\") * CashMultiplier); format(string4, sizeof(string4), \"~p~You got %d Exp for ~n~%s !~n~~g~Level up!\", exp, reason); } } else { GameTextForPlayer(playerid, \"~g~Max Level Reached!\", GameTextTime, GameTextStyle); dini_IntSet(pfile, \"Exp\", dini_Int(pfile, \"TotalExp\")); } } else { format(string4, sizeof(string4), \"~p~You got %d Exp for ~n~%s !\", exp, reason); } format(string2, sizeof(string2), \"Exp: %05d/%05d\",dini_Int(pfile, \"Exp\"), dini_Int(pfile, \"TotalExp\")); TextDrawSetString(ExpText[playerid], string2); #if defined UseProgBar SetProgressBarValue(bar[playerid], dini_Int(pfile, \"Exp\")); SetProgressBarMaxValue(bar[playerid], dini_Int(pfile, \"TotalExp\")); UpdateProgressBar(bar[playerid], playerid); #endif GameTextForPlayer(playerid, string4, GameTextTime, GameTextStyle); format(string3, sizeof(string3), \"Level: %02d\",dini_Int(pfile, \"ExpLevel\")); Update3DTextLabelText(LevelLabel[playerid], TextLabelColor, string3); } //The function to get a player\'s level. Usage: GetPlayerLevel(playerid) stock GetPlayerExpLevel(playerid) { new Plevel; format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pName(playerid)); Plevel = dini_Int(pfile, \"ExpLevel\"); return Plevel; } //The function to get a player\'s experience. Usage: GetPlayerExp(playerid) stock GetPlayerExp(playerid) { new PExp; format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pName(playerid)); PExp = dini_Int(pfile, \"Exp\"); return PExp; } //The function to get a player\'s experience needed to lvl up. Usage: GetPlayerTotalExp(playerid) stock GetPlayerTotalExp(playerid) { new PTotalExp; format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pName(playerid)); PTotalExp = dini_Int(pfile, \"TotalExp\"); return PTotalExp; } public OnPlayerConnect(playerid) { new string2[126], string3[126]; format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pName(playerid)); if(dini_Exists(pfile)) // ha létezik.. { format(string2, sizeof(string2), \"Exp: %05d/%05d\",GetPlayerExp(playerid), GetPlayerTotalExp(playerid)); TextDrawSetString(ExpText[playerid], string2); format(string3, sizeof(string3), \"Level: %02d\",GetPlayerExpLevel(playerid)); TextDrawSetString(LevelText[playerid], string3); SetPlayerMoney(playerid, dini_Int(pfile, \"Cash\")); SetPlayerScore(playerid, dini_Int(pfile, \"Score\")); } else // ha nem.. { dini_Create(pfile); // akkor csinálja meg dini_IntSet(pfile, \"ExpLevel\", 1); dini_IntSet(pfile, \"Exp\", 0); dini_IntSet(pfile, \"TotalExp\", ExpForLevel); } format(string2, sizeof(string2), \"Exp: %05d/%05d\",GetPlayerExp(playerid), GetPlayerTotalExp(playerid)); TextDrawSetString(ExpText[playerid], string2); format(string3, sizeof(string3), \"Level: %02d\",GetPlayerExpLevel(playerid)); TextDrawSetString(LevelText[playerid], string3); return 1; } public OnPlayerDisconnect(playerid, reason) { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawDestroy(ExpText[playerid]); TextDrawDestroy(ExpText[playerid]); format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pName(playerid)); dini_IntSet(pfile, \"Cash\", GetPlayerMoney(playerid)); dini_IntSet(pfile, \"Score\", GetPlayerScore(playerid)); dini_IntSet(pfile, \"ExpLevel\", GetPlayerExp(playerid)); // level elmentése dini_IntSet(pfile, \"Exp\", GetPlayerExpLevel(playerid)); // exp elmentése dini_IntSet(pfile, \"TotalExp\", GetPlayerTotalExp(playerid)); // totalexp elmentése return 1; } public OnPlayerSpawn(playerid) { TextDrawShowForPlayer(playerid, Textdraw0); TextDrawShowForPlayer(playerid, ExpText[playerid]); TextDrawShowForPlayer(playerid, LevelText[playerid]); return 1; } public OnPlayerDeath(playerid, killerid, reason) { if (killerid != playerid) { if (GetPlayerExpLevel(playerid) < GetPlayerExpLevel(killerid)) { GivePlayerExp(killerid, 100, \"killing a lower level player\"); } else if (GetPlayerExpLevel(playerid) > GetPlayerExpLevel(killerid)) { GivePlayerExp(killerid, 300, \"killing a higher level player\"); } else { GivePlayerExp(killerid, 200, \"killing a player at your own level\"); } } // An example of using my exp system. return 1; } dcmd_addexp(playerid,params[]) { #pragma unused params GivePlayerExp(playerid, 500, \"addexp parancs hasznalata\"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(addexp,6,cmdtext); return 0; } new pname[24]; pName(playerid) { GetPlayerName(playerid, pname, sizeof(pname)); return pname; }
22
« Dátum: 2013. Július 17. - 17:47:57 »
Üdv megint! :Cry2: Motmár ez a valami megy regisztráció nélkül + lementi az init. A hiba ott kezdõdik gyûjtök 100Exp kilépek restatartolja a mentett init és kezdõdik minden elõrõl! Szóval nem ment ha nem újraindítja az init ennek mi az oka?
23
« Dátum: 2013. Július 17. - 17:12:48 »
A mód elejére...
#include <dini>
:facepalm: Dupla hozzászólás automatikusan összefûzve. ( 2013. Július 17. - 17:34:40 )
Köszönöm
24
« Dátum: 2013. Július 17. - 16:34:34 »
Üdv! Letöltöttem egy szintrendszert volt benne regisztrációs rendszer... Azt próbáltam kivenni és olyat beletenni, hogy névre mentsen tehát ha valaki fellép a szerverre készítsen neki Scriptfilesbe egy XY.ini (névtõl függ) amibe lementi a szintjét. De nekem nem ment le semmit.. :/ Ennek mi az oka? #include <a_samp> #include <dudb> #include <progress> new Text:ExpText[MAX_PLAYERS]; new Text:LevelText[MAX_PLAYERS]; new Text:Textdraw0; new Bar:bar[MAX_PLAYERS]; new Text3D:LevelLabel[MAX_PLAYERS]; //You can change these values. #define ExpForLevel 1000 //How much exp you need to pass a level. The Exp gets multiplied by the level. If you\'ve got 1000 total exp then for lvl 2 it will be 2000 #define MaxLevel 99 //The maximum level a player can achieve. #define UseProgBar // Define wheater to use íthe progress bar or not. Comment the line if you don\'t want a progress bar and leave like that if you do want a progress bar. #define ProgBarColor 0x0000FFFF //The experience bar\'s color. #define TextLabelColor 0x00FFFFFF // The textlabel\'s color. #define CashForLevelUp 300 //This is the cash you get for levelling up. It gets multiplied by the level you achieved and one more time by a number you define. #define CashMultiplier 1 //This multiplies the Cash * Level achieved by the number you want. #define GameTextStyle 4 //This defines the GameText\'s style used for the GivePlayerExp function. #define GameTextTime 3000 //This defines the time for which the GameText for the GivePlayerExp function will be visible #pragma unused strtok #pragma unused ret_memcpy //Declaring New new nev[MAX_PLAYER_NAME]; //The function which gives exp. Usage: GivePlayerExp(playerid, ammount, reason); stock GivePlayerExp(playerid, exp, reason[]) { new pfile[100], pname[MAX_PLAYER_NAME], string2[126], string3[126], string4[126]; GetPlayerName(playerid, pname, sizeof(pname)); format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pname); dini_IntSet(pfile, \"Exp\", dini_Int(pfile, \"Exp\") +exp); if (dini_Int(pfile, \"Exp\") >= dini_Int(pfile, \"TotalExp\")) { if (dini_Int(pfile, \"ExpLevel\") < MaxLevel) { while (dini_Int(pfile, \"Exp\") >= dini_Int(pfile, \"TotalExp\")) { dini_IntSet(pfile, \"Exp\", dini_Int(pfile, \"Exp\") - dini_Int(pfile, \"TotalExp\")); dini_IntSet(pfile, \"ExpLevel\", dini_Int(pfile, \"ExpLevel\") + 1); dini_IntSet(pfile, \"TotalExp\", dini_Int(pfile, \"ExpLevel\") * ExpForLevel); format(string3, sizeof(string3), \"Level: %02d\",dini_Int(pfile, \"ExpLevel\")); TextDrawSetString(LevelText[playerid], string3); GivePlayerMoney(playerid, CashForLevelUp * dini_Int(pfile, \"ExpLevel\") * CashMultiplier); format(string4, sizeof(string4), \"~p~You got %d Exp for ~n~%s !~n~~g~Level up!\", exp, reason); } } else { GameTextForPlayer(playerid, \"~g~Max Level Reached!\", GameTextTime, GameTextStyle); dini_IntSet(pfile, \"Exp\", dini_Int(pfile, \"TotalExp\")); } } else { format(string4, sizeof(string4), \"~p~You got %d Exp for ~n~%s !\", exp, reason); } format(string2, sizeof(string2), \"Exp: %05d/%05d\",dini_Int(pfile, \"Exp\"), dini_Int(pfile, \"TotalExp\")); TextDrawSetString(ExpText[playerid], string2); #if defined UseProgBar SetProgressBarValue(bar[playerid], dini_Int(pfile, \"Exp\")); SetProgressBarMaxValue(bar[playerid], dini_Int(pfile, \"TotalExp\")); UpdateProgressBar(bar[playerid], playerid); #endif GameTextForPlayer(playerid, string4, GameTextTime, GameTextStyle); format(string3, sizeof(string3), \"Level: %02d\",dini_Int(pfile, \"ExpLevel\")); Update3DTextLabelText(LevelLabel[playerid], TextLabelColor, string3); } //The function to get a player\'s level. Usage: GetPlayerLevel(playerid) stock GetPlayerExpLevel(playerid) { new pfile[100], pname[MAX_PLAYER_NAME], Plevel; GetPlayerName(playerid, pname, sizeof(pname)); format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pname); Plevel = dini_Int(pfile, \"ExpLevel\"); return Plevel; } //The function to get a player\'s experience. Usage: GetPlayerExp(playerid) stock GetPlayerExp(playerid) { new pfile[100], pname[MAX_PLAYER_NAME], PExp; GetPlayerName(playerid, pname, sizeof(pname)); format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pname); PExp = dini_Int(pfile, \"Exp\"); return PExp; } //The function to get a player\'s experience needed to lvl up. Usage: GetPlayerTotalExp(playerid) stock GetPlayerTotalExp(playerid) { new pfile[100], pname[MAX_PLAYER_NAME], PTotalExp; GetPlayerName(playerid, pname, sizeof(pname)); format(pfile, sizeof(pfile), \"Szerver/%s.ini\",pname); PTotalExp = dini_Int(pfile, \"TotalExp\"); return PTotalExp; } public OnPlayerConnect(playerid) { new string2[126], string3[126]; new pfile[100]; GetPlayerName(playerid, nev, sizeof(nev)); format(pfile, sizeof(pfile), \"Szerver/%s.ini\",nev); if(!dini_Exists(pfile)) { } dini_Create(pfile); dini_IntSet(pfile, \"ExpLevel\", 1); dini_IntSet(pfile, \"Exp\", 0); dini_IntSet(pfile, \"TotalExp\", ExpForLevel); format(string2, sizeof(string2), \"Exp: %05d/%05d\",dini_Int(pfile, \"Exp\"), dini_Int(pfile, \"TotalExp\")); TextDrawSetString(ExpText[playerid], string2); format(string3, sizeof(string3), \"Level: %02d\",dini_Int(pfile, \"ExpLevel\")); TextDrawSetString(LevelText[playerid], string3); TextDrawShowForPlayer(playerid, ExpText[playerid]); TextDrawShowForPlayer(playerid, LevelText[playerid]); format(string2, sizeof(string2), \"Exp: %05d/%05d\",dini_Int(pfile, \"Exp\"), dini_Int(pfile, \"TotalExp\")); format(string3, sizeof(string3), \"Level: %02d\",dini_Int(pfile, \"ExpLevel\")); return 1; } public OnPlayerDisconnect(playerid, reason) { TextDrawHideForAll(Textdraw0); TextDrawDestroy(Textdraw0); TextDrawDestroy(ExpText[playerid]); TextDrawDestroy(ExpText[playerid]); new pfile[100], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, nev, sizeof(pname)); format(pfile, sizeof(pfile), \"/Szerver/%s.ini\",pname); dini_IntSet(pfile, \"Cash\", GetPlayerMoney(playerid)); dini_IntSet(pfile, \"Score\", GetPlayerScore(playerid)); return 1; } public OnPlayerSpawn(playerid) { TextDrawShowForPlayer(playerid, Textdraw0); return 1; } public OnPlayerDeath(playerid, killerid, reason) { if (killerid != playerid) { if (GetPlayerExpLevel(playerid) < GetPlayerExpLevel(killerid)) { GivePlayerExp(killerid, 100, \"killing a lower level player\"); } else if (GetPlayerExpLevel(playerid) > GetPlayerExpLevel(killerid)) { GivePlayerExp(killerid, 300, \"killing a higher level player\"); } else { GivePlayerExp(killerid, 200, \"killing a player at your own level\"); } } // An example of using my exp system. return 1; }
UI: Textdraw most nem tettem bele
25
« Dátum: 2013. Július 17. - 14:55:12 »
Üdv! Dinivel megoldható-e az, hogy a játékos adatait (Score,Cash) névre mentse.... Vagyis ne legyen semmiféle reg rendszer jelszóval meg hasonló, hanem mikor elõször feljön létrehoz neki egy mappát a Scriptfilesben majd mikor következõleg fellép pénze pontja amit eddig megszerzett megmaradjon neki És ha van ilyenre Script vagy valami példa valaki leírná?
26
« Dátum: 2013. Július 16. - 20:18:49 »
Hy Leöltöttem 2scriptet egy Admin+Szint rendszert és mind2-be van regisztrációs rendszer (dini), ÖSsze kellene valahogy lépíteni õket de sehogy sem sikerül valaki összerakná nekem? http://www.solidfiles.com/d/16297f2bcb/
27
« Dátum: 2013. Július 15. - 17:40:52 »
Hy! Van egy olyanom vagyis lenne hogy, ha admin ír a chatbe akkor [ADMIN] jelzõ jelenik meg elõtte de mikor írok láthatatlan az írás... public OnPlayerText(playerid, text[]) { if(pInfo[playerid][Admin] >= 1) { new str[128]; format(str, 128, \"[Admin]%s: %s\", GetName(playerid), text); SendClientMessageToAll(COLOR_ORANGE, string); return 0; } if(pInfo[playerid][VIP] >= 1) { new str[130]; format(str, 130, \"[VIP]%s: %s\", GetName(playerid), text); SendClientMessageToAll(COLOR_YELLOW, str); return 0; } } return 1; }
28
« Dátum: 2013. Július 15. - 15:30:06 »
Üdv! Van egy parancsom ha beírom /asay akkor mikor ír az admin a chatbe akkor [ADMIN] megjelenik a neve elé... Én azt akarom megoldani, hogy ne kelljen ezt beírni hanem mikor bejelentkezett akkor mikor ír chatbe mindig jelenjen meg a neve elõtt az [ADMIN] jelzõ.. CMD:asay(playerid, params[]) { new string[128]; CL(playerid); if(pInfo[playerid][Admin] >= 1) { if(sscanf(params, \"s[128]\", params)) { SendClientMessage(playerid, COLOR_RED, \"HASZNÁLAT: /asay [szöveg]\"); return 1; } format(string, sizeof(string), \"[Admin]%s: %s\", GetName(playerid), params); SendClientMessageToAll(COLOR_ORANGE, string); SendCommandToAdmins(playerid,\"ASAY\"); } else return Error(playerid, 3); return 1;
29
« Dátum: 2013. Július 04. - 10:58:01 »
Üdv! Problèmàm megpróbàlom èrthetõen leírni :-D Szval tegyük fel van egy \"A\" ès egy \"B\" pont ha az A pont pickupjaba irom be /fegyver akkor egy m4-et ad ha B pont pickupjába írom be /fegyver akkor egy ak47 adjon... hogy lehet ezt megoldani? :hmmm:
30
« Dátum: 2013. Május 16. - 19:31:26 »
Fél éve abbahagytam a SA:MP és a scriptelés egy részét Mostanába minden játékos aki gamel arra törekszik, hogy legyen szervere (kb. 70%) Farkasétvággyal várják kinek fuccsol be a szervere (pl: SEE) várják hogy felkerüljön a mód és 1millió szerver nyílik utána.... Szóval tömören annyi szerver lesz lassan mint amennyi játékos és így elõbb vagy utóbb kihal mint a dinók
Oldalak: 1 [2] 3 4 ... 11
|