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 - ROOCK
Oldalak: 1 ... 9 10 [11] 12 13
151
« Dátum: 2013. november 08. - 16:31:42 »
Heló irtam egy texdrawos személyit tökéletesen mûködik csak az a baj hogy nem tölti be az adatokat mert belép megcsinálja szeméylit megcsinálja a személyit lelép az emberke vissza lép akkor még kiirja de ha a servert restartolom akkor azt irja ki hogy nincs kitöltve #include #include #define PATH \"/ROOCKmunka/Szemelyi/%s.jog\" #define DIALOG_REGISTER 1 #define DIALOG_SUCCESS_1 3 #define COL_WHITE \"{FFFFFF}\" #define COL_RED \"{F81414}\" #define COL_GREEN \"{00FF22}\" #define COL_LIGHTBLUE \"{00CED1}\" #define RED 0xff0000AA #define COLOR_RED 0xff0000AA #define COLOR_GREEN 0x00ff15AA #define szemelyi 7 #define kor 8896 #define nem 8897 #define lakh 8898 new Text:Szm1, Text:Szm2, Text:Szm3, Text:Szm4, Text:Szm5, Text:Szm6, Text:Szm61, Text:Szm62, Text:Szm63, Text:Szm64, Text:Szm65, Text:Szm66, Text:Szm67, Text:Szm7, Text:Szm8, Text:Szm81, Text:Szm82, Text:Szm9, Text:Szm10, Text:Szm101, Text:Szm102, Text:Szm103, Text:Szm104; enum pInfo { Nev, Nem, Kor, Lak, Mun, LMun, Mire, Autoja, Rendszam } new PlayerInfo[MAX_PLAYERS][pInfo]; forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int(\"Kor\",PlayerInfo[playerid][Kor]); INI_Int(\"Nem\",PlayerInfo[playerid][Nem]); INI_Int(\"Lakhely\",PlayerInfo[playerid][Lak]); INI_Int(\"Munka\",PlayerInfo[playerid][Mun]); return 1; } public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); }else{ ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,\"\"COL_WHITE\"Regisztráció...\",\"\"COL_WHITE\"Ird be a jelszavad az új acountért.\",\"Register\",\"Quit\"); } new namee[MAX_PLAYER_NAME]; GetPlayerName(playerid,namee,MAX_PLAYER_NAME); new str[128]; format(str, sizeof str, \"%s\",namee); Szm1 = TextDrawCreate(635.000000, 279.000000, \".\"); TextDrawBackgroundColor(Szm1, 16711935); TextDrawLetterSize(Szm1, 0.050000, 10.000013); TextDrawUseBox(Szm1, 1); TextDrawBoxColor(Szm1, 255); TextDrawTextSize(Szm1, 440.000000, -155.000000); Szm2 = TextDrawCreate(502.000000, 284.000000, \"Szemelyi\"); TextDrawBackgroundColor(Szm2, 255); TextDrawLetterSize(Szm2, 0.500000, 1.000000); TextDrawColor(Szm2, -65281); Szm3 = TextDrawCreate(460.000000, 295.000000, \"Nev:\"); TextDrawLetterSize(Szm3, 0.500000, 1.000000); TextDrawColor(Szm3, -1); Szm4 = TextDrawCreate(505.000000, 294.000000, str); TextDrawLetterSize(Szm4, 0.500000, 1.000000); TextDrawColor(Szm4, -1); Szm5 = TextDrawCreate(460.000000, 310.000000, \"Kor:\"); TextDrawLetterSize(Szm5, 0.500000, 1.000000); TextDrawColor(Szm5, -1); Szm6 = TextDrawCreate(500.000000, 310.000000, \"Nincs Adat\"); TextDrawLetterSize(Szm6, 0.500000, 1.000000); TextDrawColor(Szm6, -1); Szm61 = TextDrawCreate(500.000000, 310.000000, \"14\"); Szm62 = TextDrawCreate(500.000000, 310.000000, \"15\"); Szm63 = TextDrawCreate(500.000000, 310.000000, \"16\"); Szm64 = TextDrawCreate(500.000000, 310.000000, \"17\"); Szm65 = TextDrawCreate(500.000000, 310.000000, \"18\"); Szm66 = TextDrawCreate(500.000000, 310.000000, \"19\"); Szm67 = TextDrawCreate(500.000000, 310.000000, \"20\"); Szm7 = TextDrawCreate(460.000000, 324.000000, \"Lakhely:\"); TextDrawLetterSize(Szm7, 0.500000, 1.000000); TextDrawColor(Szm7, -1); Szm8 = TextDrawCreate(459.000000, 338.000000, \"Nincs Adat\"); TextDrawLetterSize(Szm8, 0.500000, 1.000000); TextDrawColor(Szm8, -1); Szm81 = TextDrawCreate(459.000000, 338.000000, \"Las Barrancas\"); TextDrawLetterSize(Szm81, 0.500000, 1.000000); TextDrawColor(Szm8, -1); Szm82 = TextDrawCreate(459.000000, 338.000000, \"Fort Carson\"); TextDrawLetterSize(Szm82, 0.500000, 1.000000); TextDrawColor(Szm8, -1); Szm9 = TextDrawCreate(460.000000, 356.000000, \"Munka:\"); TextDrawLetterSize(Szm9, 0.500000, 1.000000); TextDrawColor(Szm9, -1); Szm10 = TextDrawCreate(523.000000, 356.000000, \"Nincs Adat\"); TextDrawLetterSize(Szm10, 0.500000, 1.000000); TextDrawColor(Szm10, -1); Szm101 = TextDrawCreate(523.000000, 356.000000, \"Uttisztito\"); TextDrawLetterSize(Szm101, 0.500000, 1.000000); TextDrawColor(Szm101, -1); Szm102 = TextDrawCreate(523.000000, 356.000000, \"Cementes\"); TextDrawLetterSize(Szm102, 0.500000, 1.000000); TextDrawColor(Szm102, -1); Szm103 = TextDrawCreate(523.000000, 356.000000, \"Fuvarozo\"); TextDrawLetterSize(Szm103, 0.500000, 1.000000); TextDrawColor(Szm103, -1); Szm104 = TextDrawCreate(523.000000, 356.000000, \"Penzszelitó\"); TextDrawLetterSize(Szm104, 0.500000, 1.000000); TextDrawColor(Szm104, -1); TextDrawHideForPlayer(playerid, Szm1); TextDrawHideForPlayer(playerid, Szm2); TextDrawHideForPlayer(playerid, Szm3); TextDrawHideForPlayer(playerid, Szm4); TextDrawHideForPlayer(playerid, Szm5); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm67); TextDrawHideForPlayer(playerid, Szm7); TextDrawHideForPlayer(playerid, Szm8); TextDrawHideForPlayer(playerid, Szm81); TextDrawHideForPlayer(playerid, Szm82); TextDrawHideForPlayer(playerid, Szm9); TextDrawHideForPlayer(playerid, Szm101); TextDrawHideForPlayer(playerid, Szm102); TextDrawHideForPlayer(playerid, Szm103); TextDrawHideForPlayer(playerid, Szm104); return 1; } public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_WriteInt(File, \"Munkája\", PlayerInfo[playerid][Mun]); INI_WriteString(File, \"LMunkája\", PlayerInfo[playerid][LMun]); INI_WriteString(File, \"Mire\", PlayerInfo[playerid][Mire]); INI_WriteString(File, \"Autója\", PlayerInfo[playerid][Autoja]); INI_WriteString(File, \"Rendszám\", PlayerInfo[playerid][Rendszam]); INI_Close(File); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, \"\"COL_WHITE\"Regisztráció...\",\"\"COL_RED\"Rossz jelszót adtál meg.\\n\"COL_WHITE\"Ird be a jelszavad az új acountért.\",\"Register\",\"Quit\"); new INI:File = INI_Open(UserPath(playerid)); INI_WriteInt(File, \"Kor\",0); INI_WriteInt(File, \"Lakhely\",0); INI_WriteInt(File, \"Munka\",0); INI_WriteInt(File, \"Nem\",0); INI_WriteString(File, \"LMunkája\", \"Nincs Kitöltve\"); INI_WriteString(File, \"Mire\", \"Nincs Kitöltve\"); INI_WriteString(File, \"Autója\", \"Nincs Kitöltve\"); INI_WriteString(File, \"Rendszám\", \"Nincs Kitöltve\"); INI_Close(File); ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,\"\"COL_WHITE\"Zsir!\",\"\"COL_GREEN\"Késza cucmód jáccá.(Isten is jó cucmó!)\",\"Ok\",\"\"); } } } if(dialogid == szemelyi && response) { switch(listitem) { case 0:{ShowPlayerDialog(playerid, kor, DIALOG_STYLE_LIST, \"Korod?\", \"14\\n15\\n16\\n17\\n18\\n19\\n20\", \"Választ\", \"Kilép\");} case 1:{ShowPlayerDialog(playerid, nem, DIALOG_STYLE_LIST, \"Nemed\", \"Férfi\\nNõ\", \"Választ\", \"Kilép\");} case 2:{ShowPlayerDialog(playerid, lakh, DIALOG_STYLE_LIST, \"Lakhelyed\", \"Fort Carson\\nLas Barrancas\", \"Választ\", \"Kilép\");} } } if(dialogid == kor) { switch(listitem) { case 0:{PlayerInfo[playerid][Kor]=14;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} case 1:{PlayerInfo[playerid][Kor]=15;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} case 2:{PlayerInfo[playerid][Kor]=16;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} case 3:{PlayerInfo[playerid][Kor]=17;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} case 4:{PlayerInfo[playerid][Kor]=18;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} case 5:{PlayerInfo[playerid][Kor]=19;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} case 6:{PlayerInfo[playerid][Kor]=20;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Kor\",PlayerInfo[playerid][Kor]);INI_Close(File);} } } if(dialogid == nem) { switch(listitem) { case 0:{PlayerInfo[playerid][Nem] = 1;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Nem\",PlayerInfo[playerid][Nem]);INI_Close(File);} case 1:{PlayerInfo[playerid][Nem] = 2;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Nem\",PlayerInfo[playerid][Nem]);INI_Close(File);} } } if(dialogid == lakh) { switch(listitem) { case 0:{PlayerInfo[playerid][Lak] = 1;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Lakhely\",PlayerInfo[playerid][Lak]);INI_Close(File);} case 1:{PlayerInfo[playerid][Lak] = 2;new INI:File = INI_Open(UserPath(playerid));INI_WriteInt(File, \"Lakhely\",PlayerInfo[playerid][Lak]);INI_Close(File);} } } return 0; } new szemelyii; public OnGameModeInit() { szemelyii = CreatePickup(1239, 1, 246.4413,118.2155,1003.2188); Create3DTextLabel(\"Személyi\", COLOR_RED, 246.4413,118.2155,1003.2188, 40.0, 0, 10); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(\"/szemelyi\", cmdtext, true) == 0) { TextDrawShowForPlayer(playerid, Szm1); TextDrawShowForPlayer(playerid, Szm2); TextDrawShowForPlayer(playerid, Szm3); if (PlayerInfo[playerid][Kor] <= 1){ TextDrawShowForPlayer(playerid, Szm6); }else if (PlayerInfo[playerid][Kor] == 14){ TextDrawShowForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm67); }else if (PlayerInfo[playerid][Kor] == 15){ TextDrawShowForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm67); }else if (PlayerInfo[playerid][Kor] == 16){ TextDrawShowForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm67); }else if (PlayerInfo[playerid][Kor] == 17){ TextDrawShowForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm67); }else if (PlayerInfo[playerid][Kor] == 18){ TextDrawShowForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm67); }else if (PlayerInfo[playerid][Kor] == 19){ TextDrawShowForPlayer(playerid, Szm66); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm67); }else if (PlayerInfo[playerid][Kor] == 20){ TextDrawShowForPlayer(playerid, Szm67); TextDrawHideForPlayer(playerid, Szm6); TextDrawHideForPlayer(playerid, Szm61); TextDrawHideForPlayer(playerid, Szm62); TextDrawHideForPlayer(playerid, Szm63); TextDrawHideForPlayer(playerid, Szm64); TextDrawHideForPlayer(playerid, Szm65); TextDrawHideForPlayer(playerid, Szm66); } TextDrawShowForPlayer(playerid, Szm5); TextDrawShowForPlayer(playerid, Szm4); TextDrawShowForPlayer(playerid, Szm7); if (PlayerInfo[playerid][Lak] == 2){ TextDrawShowForPlayer(playerid, Szm81); TextDrawHideForPlayer(playerid, Szm82); TextDrawHideForPlayer(playerid, Szm8); }else if (PlayerInfo[playerid][Lak] == 1){ TextDrawShowForPlayer(playerid, Szm82); TextDrawHideForPlayer(playerid, Szm81); TextDrawHideForPlayer(playerid, Szm8); }else if (PlayerInfo[playerid][Lak] == 0){ TextDrawShowForPlayer(playerid, Szm8); TextDrawHideForPlayer(playerid, Szm81); TextDrawHideForPlayer(playerid, Szm82); } TextDrawShowForPlayer(playerid, Szm9); if (PlayerInfo[playerid][Mun] == 0){ TextDrawShowForPlayer(playerid, Szm10); }else if (PlayerInfo[playerid][Mun] == 1){ TextDrawShowForPlayer(playerid, Szm101); TextDrawHideForPlayer(playerid, Szm102); TextDrawHideForPlayer(playerid, Szm103); TextDrawHideForPlayer(playerid, Szm104); }else if (PlayerInfo[playerid][Mun] == 2){ TextDrawShowForPlayer(playerid, Szm102); TextDrawHideForPlayer(playerid, Szm101); TextDrawHideForPlayer(playerid, Szm103); TextDrawHideForPlayer(playerid, Szm104); }else if (PlayerInfo[playerid][Mun] == 3){ TextDrawShowForPlayer(playerid, Szm103); TextDrawHideForPlayer(playerid, Szm101); TextDrawHideForPlayer(playerid, Szm102); TextDrawHideForPlayer(playerid, Szm104); }else if (PlayerInfo[playerid][Mun] == 4){ TextDrawShowForPlayer(playerid, Szm104); TextDrawHideForPlayer(playerid, Szm101); TextDrawHideForPlayer(playerid, Szm102); TextDrawHideForPlayer(playerid, Szm103); } return 1; } return 0; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == szemelyii) { ShowPlayerDialog(playerid, szemelyi, DIALOG_STYLE_LIST, \"Személyi\", \"Korod?\\nNeme?\\nLakhelye?\", \"Választ\", \"Kilép\"); SetPlayerPos(playerid, 246.4413,116.2155,1003.2188); return 1; } return 0; } stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } /*Credits to Dracoblue*/ stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; }
152
« Dátum: 2013. június 20. - 17:26:26 »
ha ugy van nálad ez a rendörös cucc hogy /szolgalat vagy valami ilyesmi akkor amikor beirja a kodot hogy szolgalatba lépjen kérd le az összes player korozeset és tedd be a korozottet olyan szinbe amilyen körözésbe van és ha rpg a mod akkor meg a többi playert tüntesd el a maprol ugy jobban fest
153
« Dátum: 2013. június 20. - 17:14:15 »
ez nekem is van aszerómon én ugy oldottam meg hogy mindenki látja hogy az mberke mien szinben van körözésbe de a többi ember meg fehér szoval ja egyszerû és nagyszerû public OnPlayerSpawn(playerid) { if(JatekosInfo[playerid][Korozottseg] >= 1) { SetPlayerColor(playerid, 0xe8b2b2AA); } if(JatekosInfo[playerid][Korozottseg] >= 2) { SetPlayerColor(playerid, 0xe07e7eAA); } if(JatekosInfo[playerid][Korozottseg] >= 3) { SetPlayerColor(playerid, 0xff8a8aAA); } if(JatekosInfo[playerid][Korozottseg] >= 4) { SetPlayerColor(playerid, 0xff6b6bAA); } if(JatekosInfo[playerid][Korozottseg] >= 5) { SetPlayerColor(playerid, 0xff0000AA); } if(JatekosInfo[playerid][Korozottseg] >= 6) { SetPlayerColor(playerid, 0xc71e1eAA); } return 1; }
154
« Dátum: 2013. június 20. - 16:57:48 »
sok minden okoszahtja pl az is hogy nem tölti be a TD.amx et másold be a gamemodod lehet abba van valami elirva az is okozhat ilyet vagy a még a TD filescriptet másold be lehet az okozza igy ebböl nem tom eldönteni
155
« Dátum: 2013. június 20. - 16:54:20 »
mivel a scriptek nem nagyon változnak a 0.3x be ezért csak annyit kell csinálnod hogy a samp-server.exét kicseréled a mostanira és ennyi vagy még kicserélheted az összes filet kivéve a mapákat és a server.cfg-t
156
« Dátum: 2013. június 20. - 16:33:52 »
innen kimásolod ezt és beleteszed egy jegyzet tömb be ha megvan akkor átirod a nevét SII.inc re és beleteszed a pawnoba gondolom tod hova kell /*VISITE NOSSO SITE: http://www.sampknd.com/ VISITE NOSSO FACEBOOK: http://www.facebook.com/SampKnd SAMP KND MELHOR BLOG DE SAMP DO BRASIL */ //====================================================== // Slick\'s INI Include 2.0.7 // // (c) Copyright 2008-2010, [DRuG]Slick // This file is provided as is (no warranties). //====================================================== #pragma dynamic 45000 // Change accordingly!! #if defined MAX_STRING #define INI_MAX_VALUE MAX_STRING #else #define INI_MAX_VALUE 128 #endif #define INI_MAX_KEY 24 #define INI_MAX_LINE (INI_MAX_KEY + INI_MAX_VALUE + 3) #define INI_MAX_FILENAME 256 #define INI_MAX_LINES 256 enum E_CACHE { E_KEY[iNI_MAX_KEY], E_VALUE[iNI_MAX_VALUE] } enum E_FILE { E_FILENAME[iNI_MAX_FILENAME], bool: E_OPEN } static gCache[iNI_MAX_LINES][E_CACHE]; static gEmptyCache[E_CACHE]; static gFile[E_FILE]; static gNoFile[E_FILE]; #define INI_Exist fexist stock INI_Open(const filename[]) { if (!filename[0]) return false; if (gFile[E_OPEN]) { if (!strcmp(gFile[E_FILENAME], filename, true)) return true; //return false; INI_Close(); } new File: h; h = fopen(filename, io_readwrite); if (h) { INI_strcpy(gFile[E_FILENAME], filename, INI_MAX_FILENAME, INI_MAX_FILENAME); new line[iNI_MAX_LINE]; new ln = -1; new separator; while (((ln + 1) < INI_MAX_LINES) && (fread(h, line))) { ln ++; INI_StripLine(line); separator = strfind(line, \"=\", false); if ((line[0] == \';\') || (line[0] == \'=\') || (separator == -1) || (separator > INI_MAX_KEY)) { if (line[0] == \';\') { INI_strcpy(gCache[ln][E_VALUE], line, INI_MAX_VALUE, INI_MAX_VALUE); } else { INI_strcpy(gCache[ln][E_VALUE][1], line, INI_MAX_VALUE - 1, INI_MAX_VALUE - 1); gCache[ln][E_VALUE][0] = \';\'; } continue; } INI_strcpy(gCache[ln][E_KEY], line, separator, INI_MAX_KEY); INI_strcpy(gCache[ln][E_VALUE], line[separator + 1], INI_MAX_VALUE, INI_MAX_VALUE); if (!gCache[ln][E_VALUE][0]) gCache[ln][E_VALUE][0] = \' \'; } fclose(h); gFile[E_OPEN] = true; return 1; } return 0; } stock INI_Save() { if (!gFile[E_OPEN]) return false; new File: h; h = fopen(gFile[E_FILENAME], io_write); if (h) { new line[iNI_MAX_LINE]; new ln = -1; while (((ln + 1) < INI_MAX_LINES) && (gCache[ln + 1][E_VALUE][0])) { ln ++; if (gCache[ln][E_VALUE][0] == \';\') { if (gCache[ln][E_VALUE][1]) { format(line, sizeof(line), \"%s\\r\\n\", gCache[ln][E_VALUE]); fwrite(h, line); continue; } fwrite(h, \"\\r\\n\"); continue; } format(line, sizeof(line), \"%s=%s\\r\\n\", gCache[ln][E_KEY], gCache[ln][E_VALUE]); fwrite(h, line); } fclose(h); return true; } return false; } stock INI_Close() { if (!gFile[E_OPEN]) return false; for (new ln; ln < INI_MAX_LINES; ln++) gCache[ln] = gEmptyCache; gFile = gNoFile; return true; } stock INI_ReadString(dest[], const key[], maxlength = sizeof(dest)) { if ((!gFile[E_OPEN]) || (!key[0])) return false; new ln = -1; while (((ln + 1) < INI_MAX_LINES) && (gCache[ln + 1][E_VALUE][0])) { ln ++; if (gCache[ln][E_VALUE][0] == \';\') continue; if (!strcmp(gCache[ln][E_KEY], key, false)) { INI_strcpy(dest, gCache[ln][E_VALUE], INI_MAX_VALUE, maxlength); return true; } } return false; } stock INI_ReadInt(const key[]) { new dest[12]; if (INI_ReadString(dest, key)) return strval(dest); return false; } stock Float: INI_ReadFloat(const key[]) { new dest[12]; if (INI_ReadString(dest, key)) return floatstr(dest); return 0.0; } stock INI_WriteString(const key[], const value[]) { if ((!gFile[E_OPEN]) || (!key[0]) || (key[0] == \';\') || (strfind(key, \"=\", false) != -1)) return false; new ln = -1; while (((ln + 1) < INI_MAX_LINES) && (gCache[ln + 1][E_VALUE][0])) { ln ++; if (gCache[ln][E_VALUE][0] == \';\') continue; if (!strcmp(gCache[ln][E_KEY], key, false)) { INI_strcpy(gCache[ln][E_VALUE], value, INI_MAX_VALUE, INI_MAX_VALUE); return true; } } ln ++; if (ln < INI_MAX_LINES) { INI_strcpy(gCache[ln][E_KEY], key, INI_MAX_KEY, INI_MAX_KEY); INI_strcpy(gCache[ln][E_VALUE], value, INI_MAX_VALUE, INI_MAX_VALUE); return true; } return false; } stock INI_WriteInt(const key[], value) { new dest[12]; format(dest, sizeof(dest), \"%i\", value); return INI_WriteString(key, dest); } stock INI_WriteFloat(const key[], Float: value) { new dest[12]; format(dest, sizeof(dest), \"%0.4f\", value); return INI_WriteString(key, dest); } stock INI_RemoveEntry(const key[]) { if ((!gFile[E_OPEN]) || (!key[0]) || (strfind(key, \"=\", false) != -1)) return false; new ln = -1; while (((ln + 1) < INI_MAX_LINES) && (gCache[ln + 1][E_VALUE][0])) { ln ++; if (gCache[ln][E_VALUE][0] == \';\') continue; if (!strcmp(gCache[ln][E_KEY], key, false)) { for (; ln < (INI_MAX_LINES - 1); ln ++) { INI_strcpy(gCache[ln][E_KEY], gCache[ln + 1][E_KEY], INI_MAX_KEY, INI_MAX_KEY); INI_strcpy(gCache[ln][E_VALUE], gCache[ln + 1][E_VALUE], INI_MAX_VALUE, INI_MAX_VALUE); } return true; } } return false; } stock INI_Remove(const filename[]) { if (!filename[0]) return false; if ((gFile[E_OPEN]) && (!strcmp(gFile[E_FILENAME], filename, true))) gFile = gNoFile; return fremove(filename); } stock INI_strcpy(dest[], const source[], numcells = sizeof(source), maxlength = sizeof(dest)) { new i; while ((source) && (i < numcells) && (i < maxlength)) { dest = source; i ++; } dest[(i == maxlength) ? (i - 1) : (i)] = \'\\0\'; } stock INI_StripLine(string[]) { new l; l = strlen(string); if (string[l - 2] == \'\\r\') string[l - 2] = \'\\0\'; if (string[l - 1] == \'\\n\') string[l - 1] = \'\\0\'; } Dupla hozzászólás automatikusan összefûzve. ( 2013. június 20. - 16:35:44 )
vagy ha igy nem jó akkor megtaláltam rendes oldalon is http://www.4shared.com/get/ZLosjDv6/sii.html
157
« Dátum: 2013. június 20. - 10:34:59 »
vagy írsz 1 15 szintes admin rendszert.[/quote] ja ez könnyebb
158
« Dátum: 2013. június 20. - 10:21:04 »
8szinten is ugyan azok a parancsok vannak mint 5-ösön csak 8 szintet ir a neved mellett ahozh hogy mások legyenek aparancsok ahoz neked kell irnod egyet vagy átkell irnod a szinteket ladminba vagy amit használsz
159
« Dátum: 2013. június 20. - 09:53:16 »
scripfiles ladmin users azon belül a neved és ott hogy level azt ennyi
160
« Dátum: 2013. június 18. - 19:15:26 »
ha megmondod konkrétan hogy mien parancsok legyenek benne akkor megcsinálom neked
161
« Dátum: 2013. június 18. - 08:50:02 »
lekéne zárni a formatot CMD:tele(playerid,params[]) { new Striing[3000]; format( Striing, sizeof( Striing ),\"%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\", \"{40FF00}Alap teleportok:{0800f5} /sf, /lv, /ls, /grove, /lsair, /sfair, /beach, /palomino, /casino\\n\", \"{80FF00}Alap teleportok2:{80FF00} /lvair, /chilliad, /jizzy, /maddog, /skatepark, /fb, /hh, /drag\\n\", \"{B0FF00}Tuning teleportok:{FB0000} /tune, /tune2, /tune3, /tune4, /tune5\\n\", \"{80FF80}Stunt teleportok:{0019fc} /hopdehop, /stunt\\n\", \"{80FF80}Drift teleportok:{0019fc} /drift, /drift2\\n\", \"{00FFFF}Parkour teleportok:{00FFFF} /pk\\n\", \"{FFFF00}Egyéb:{e5f50c} /rendls, /rendsf, /rendlv, /bigjump, /monsterpk, /dm, /aa, /army, /dilimore, /gokart\\n\"); ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,\"Teleportok!\",Striing,\"OK\",\"\"); return 1; }
162
« Dátum: 2013. június 18. - 08:23:40 »
tess ez zcmd vel van megoldva ha beirod hogy benzin [liter] akkor feltankolja a kocsit és leveszi a pénzt is annyiba kerül amennyit tankol annak a 2x ese #include <a_samp> #include <zcmd> #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33FF33AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BRIGHTRED 0xE60000FF #define COLOR_BLUE 0x0000FFAA #define COLOR_PURPLE 0x9900FFAA #define COLOR_BROWN 0x993300AA #define COLOR_ORANGE 0xFF9933AA #define COLOR_CYAN 0x99FFFFAA #define COLOR_TAN 0xFFFFCCAA #define COLOR_PINK 0xFF66FFAA #define COLOR_KHAKI 0x999900AA #define COLOR_LIME 0x99FF00AA #define COLOR_BLACK 0x000000AA #define COLOR_TURQ 0x00A3C0AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_DARKRED 0xAA993333 #define COLOR_VIOLET 0x9955DEEE #define COLOR_RED 0xFB0000FF #define DIVBY 1.300 new Benzin[MAX_VEHICLES], bool:PortableFuel[MAX_PLAYERS], FuelTimer; new Text: Fuel[MAX_PLAYERS], Text: BlackBox, Text: Moving[MAX_PLAYERS]; public OnFilterScriptInit() { FuelTimer = SetTimer(\"SubFuel\", 12000, true); print(\"----------------------------------\"); print(\" Fuel System by RyDeR Edited by Németh Martin(Fanatik) - Betöltve - \"); print(\"----------------------------------\"); BlackBox = TextDrawCreate(354.000000, 422.000000, \"_\"); TextDrawBackgroundColor(BlackBox, 255); TextDrawFont(BlackBox, 1); TextDrawLetterSize(BlackBox, 0.509999, 1.000000); TextDrawColor(BlackBox, -1); TextDrawSetOutline(BlackBox, 0); TextDrawSetProportional(BlackBox, 1); TextDrawSetShadow(BlackBox, 1); TextDrawUseBox(BlackBox, 1); TextDrawBoxColor(BlackBox, 0xFF80001A); TextDrawTextSize(BlackBox, 277.000000, 51.000000); new i; while (i != GetMaxPlayers()) { Fuel = TextDrawCreate(258.000000, 421.000000, \" \"); TextDrawBackgroundColor(Fuel, 255); TextDrawFont(Fuel, 1); TextDrawLetterSize(Fuel, 0.250000, 1.100000); TextDrawColor(Fuel, -1); TextDrawSetOutline(Fuel, 0); TextDrawSetProportional(Fuel, 1); TextDrawSetShadow(Fuel, 1); Moving = TextDrawCreate(354.000000, 422.000000, \"_\"); TextDrawBackgroundColor(Moving, 255); TextDrawFont(Moving, 1); TextDrawLetterSize(Moving, 0.509999, 1.000000); TextDrawColor(Moving, -1); TextDrawSetOutline(Moving, 0); TextDrawSetProportional(Moving, 1); TextDrawSetShadow(Moving, 1); TextDrawUseBox(Moving, 1); TextDrawBoxColor(Moving, 0xFF8000C1); TextDrawTextSize(Moving, 277.000000, 51.000000); ++i; } new v; while (v != MAX_VEHICLES) { Benzin[v] = random(100); ++v; } return 1; } public OnFilterScriptExit() { new i, v; while (i != GetMaxPlayers()) { TextDrawDestroy(Fuel); TextDrawDestroy(Moving); ++i; } TextDrawDestroy(BlackBox); KillTimer(FuelTimer); while (v != MAX_VEHICLES) { Benzin[v] = 100; ++v; } return 1; } forward SubFuel(); public SubFuel() { new i; while (i != GetMaxPlayers()) { if (IsPlayerInAnyVehicle(i)) { new string[128]; if(Benzin[GetPlayerVehicleID(i)] <0) Benzin[GetPlayerVehicleID(i)] = 0; if(IsPlayerInAnyVehicle(i)) { Benzin[GetPlayerVehicleID(i)]-=1; format(string, 128, \"Benzin: %%%d\", Benzin[GetPlayerVehicleID(i)]); TextDrawSetString(Fuel, string), TextDrawShowForPlayer(i, Fuel), TextDrawShowForPlayer(i, BlackBox), TextDrawTextSize(Moving, (354.0 - (Benzin[GetPlayerVehicleID(i)] / DIVBY)), 0.000000), TextDrawShowForPlayer(i, Moving); } if (Benzin[GetPlayerVehicleID(i)] < 1) { Benzin[GetPlayerVehicleID(i)] = 0; GameTextForPlayer(i, \"~n~~n~~n~~n~~n~~n~~n~~w~Nincs üzemanyag a jármûvedben.\", 4000, 3); TogglePlayerControllable(i, false); RemovePlayerFromVehicle(i); } } else { TextDrawHideForPlayer(i, Fuel), TextDrawHideForPlayer(i, BlackBox), TextDrawHideForPlayer(i, Moving); GameTextForPlayer(i, \" \", 100, 3); TogglePlayerControllable(i, true); } ++i; } return 1; } public OnVehicleSpawn(vehicleid) { Benzin[vehicleid] = random(100); } public OnPlayerConnect(playerid) { PortableFuel[playerid] = false; return 1; } public OnPlayerDisconnect(playerid, reason) { TextDrawHideForPlayer(playerid, Fuel[playerid]); TextDrawHideForPlayer(playerid, Moving[playerid]); TextDrawHideForPlayer(playerid, BlackBox); return 1; } public OnPlayerDeath(playerid, killerid, reason) { TextDrawHideForPlayer(playerid, Fuel[playerid]); TextDrawHideForPlayer(playerid, Moving[playerid]); TextDrawHideForPlayer(playerid, BlackBox); return 1; } CMD:benzin(playerid, params[]){ new miktar, string[128], string2[128], string3[128], string4[128], Fiyat, Sum; if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, \">> Nem vagy a jármûben!\"); if (!IsAtGasStation(playerid)) return SendClientMessage(playerid, COLOR_RED, \">> Nem vagy a kocsiban!\"); if (!strlen(params)) return SendClientMessage(playerid, COLOR_RED, \">> /benzin [amount in 0 - 100 l]\"); miktar = strval(params); if (miktar < 1 || miktar > 100) return SendClientMessage(playerid, COLOR_RED, \">> Rossz literszám! (0-100l)\"); if (Benzin[GetPlayerVehicleID(playerid)] >= 100) return SendClientMessage(playerid, COLOR_RED, \">> Nem tudsz tankolni a tank tele van!\"); Fiyat = (miktar * 2); format(string2, 128, \">> Nincs elég pénzed! Neked még kell $%d.\", Fiyat); if (GetPlayerMoney(playerid) < Fiyat) return SendClientMessage(playerid, COLOR_RED, string2); GivePlayerMoney(playerid, -Fiyat); format(string, 128, \">> Te tankoltál a jármûvedbe %d liter üzemanyagot. Ára: $%d.\", miktar, Fiyat); SendClientMessage(playerid, COLOR_LIME, string); Benzin[GetPlayerVehicleID(playerid)] += miktar; if (Benzin[GetPlayerVehicleID(playerid)] > 100) Sum = miktar*2-Benzin[GetPlayerVehicleID(playerid)]+100, GivePlayerMoney(playerid, Sum), format(string4, 128, \">> You have choose a too large amount of liters that your car can\'t accept. Here\'s your change($%d).\", Sum), SendClientMessage(playerid, COLOR_ORANGE, string4), Benzin[GetPlayerVehicleID(playerid)] = 100; format(string3, 128, \"Benzin: %%%d\", Benzin[GetPlayerVehicleID(playerid)]); TextDrawSetString(Fuel[playerid], string3), TextDrawShowForPlayer(playerid, Fuel[playerid]), TextDrawTextSize(Moving[playerid], (354.0 - (Benzin[GetPlayerVehicleID(playerid)] / DIVBY)), 0.000000), TextDrawShowForPlayer(playerid, Moving[playerid]); return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { new string[128], string2[128]; if(newstate == PLAYER_STATE_DRIVER) { format(string, 128, \"Benzin: %%%d\", Benzin[GetPlayerVehicleID(playerid)]); TextDrawSetString(Fuel[playerid], string), TextDrawShowForPlayer(playerid, Fuel[playerid]), TextDrawShowForPlayer(playerid, BlackBox), TextDrawTextSize(Moving[playerid], (354.0 - (Benzin[GetPlayerVehicleID(playerid)] / DIVBY)), 0.000000), TextDrawShowForPlayer(playerid, Moving[playerid]); if (Benzin[GetPlayerVehicleID(playerid)] < 1) { Benzin[GetPlayerVehicleID(playerid)] = 1; format(string2, 128, \"Benzin: %%%d\", Benzin[GetPlayerVehicleID(playerid)]); TextDrawSetString(Fuel[playerid], string2), TextDrawShowForPlayer(playerid, Fuel[playerid]), TextDrawTextSize(Moving[playerid], (354.0 - (Benzin[GetPlayerVehicleID(playerid)] / DIVBY)), 0.000000), TextDrawShowForPlayer(playerid, Moving[playerid]); } if(Benzin[GetPlayerVehicleID(playerid)] < 1) { Benzin[GetPlayerVehicleID(playerid)] = 0; GameTextForPlayer(playerid, \"~n~~n~~n~~n~~n~~n~~n~~w~Nincs elég benzin a jármûben.\", 4000, 3); RemovePlayerFromVehicle(playerid); } } else if (newstate == PLAYER_STATE_ONFOOT) { TextDrawHideForPlayer(playerid, Fuel[playerid]), TextDrawHideForPlayer(playerid, BlackBox), TextDrawHideForPlayer(playerid, Moving[playerid]); TogglePlayerControllable(playerid, true); } return 1; } stock IsAtGasStation(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 6.0,1004.0070,-939.3102,42.1797) || IsPlayerInRangeOfPoint(playerid, 6.0,1944.3260,-1772.9254,13.3906)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 6.0,-90.5515,-1169.4578,2.4079) || IsPlayerInRangeOfPoint(playerid, 6.0,-1609.7958,-2718.2048,48.5391)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 6.0,-2029.4968,156.4366,28.9498) || IsPlayerInRangeOfPoint(playerid, 8.0,-2408.7590,976.0934,45.4175)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 5.0, -2243.9629,-2560.6477,31.8841) || IsPlayerInRangeOfPoint(playerid, 8.0,-1676.6323,414.0262,6.9484)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 6.0,2202.2349,2474.3494,10.5258) || IsPlayerInRangeOfPoint(playerid, 10.0, 614.9333,1689.7418,6.6968)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 8.0,-1328.8250,2677.2173,49.7665) || IsPlayerInRangeOfPoint(playerid, 6.0,70.3882,1218.6783,18.5165)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 8.0,2113.7390,920.1079,10.5255) || IsPlayerInRangeOfPoint(playerid, 6.0,-1327.7218,2678.8723,50.0625)) { return 1; } else if(IsPlayerInRangeOfPoint(playerid, 12.0,1596.2595,2199.3120,10.8203)) { return 1; } } return 0; }
163
« Dátum: 2013. június 18. - 08:10:08 »
mien errort ir a pawno?? mert nálam tökéletesen hibátlan
164
« Dátum: 2013. június 18. - 07:55:01 »
#include <a_samp> public OnPlayerText( playerid, text[ ] ) { new iDots, iDDs, iNums; for( new l = strlen( text ), p; p < l; ++p ) { if( text[ p ] == \'.\' ) ++iDots; if( text[ p ] == \':\' ) ++iDDs; if( \'0\' <= text[ p ] <= \'9\' ) ++iNums; } if( iDots == 3 && iDDs == 1 && iNums >= 10 ) { SendClientMessage( playerid, 0xFF0000AA, \"Ne itt reklámozz!\" ); return 0; } return 1; } ez nem enged ipt irni
165
« Dátum: 2013. június 15. - 12:53:16 »
tess ez elmenti a pénzt és a pontot annyi hogy a scriptfiles-be tegyél egy ROOCKadmin mappát azon belül meg egy Users mappát és készen is vagy használd egészseggel x) #include <a_samp> #include <YSI\\y_ini> #define DIALOG_REGISTER 1 #define DIALOG_LOGIN 2 #define PATH \"/ROOCKadmin/Users/%s.rock\" enum pInfo { pPass, pCash, pScore, } new PlayerInfo[MAX_PLAYERS][pInfo]; forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int(\"Password\",PlayerInfo[playerid][pPass]); INI_Int(\"Cash\",PlayerInfo[playerid][pCash]); INI_Int(\"Score\",PlayerInfo[playerid][pScore]); return 1; } public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,\"Bejelentkezés\",\"{FFFFFF}Ird be a a jelszavad\",\"Login\",\"Quit\"); }else{ ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,\"Regisztráció...\",\"{FFFFFF}Ird be a jelszavad az új acountért.\",\"Register\",\"Quit\"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,\"data\"); INI_WriteInt(File,\"Cash\",GetPlayerMoney(playerid)); INI_WriteInt(File,\"Score\",GetPlayerScore(playerid)); INI_Close(File); } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, \"Regisztráció...\",\"{F81414}Rossz jelszót adtál meg.\\n{FFFFFF}Ird be a jelszavad az új acountért.\",\"Register\",\"Quit\"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,\"data\"); INI_WriteInt(File,\"Password\",udb_hash(inputtext)); INI_WriteInt(File,\"Cash\",0); INI_WriteInt(File,\"Score\",0); INI_Close(File); SendClientMessage(playerid, 0x1eff00AA, \"Beregisztráltál!!\"); } } case DIALOG_LOGIN: { if ( !response ) return Kick ( playerid ); if( response ) { if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), \"LoadUser_%s\", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); SendClientMessage(playerid, 0x1eff00AA, \"Bejelentkeztél!\"); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,\"Login\",\"{F81414}Nem helyes jelszót adtál meg\\n{FFFFFF}Ird be újra a belépéshez\",\"Login\",\"Quit\"); } return 1; } return 1; } } return 0; } stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; }
Oldalak: 1 ... 9 10 [11] 12 13
|