martinesik 0 Odesláno: 18. Únor, 2012 Share Odesláno: 18. Únor, 2012 Prosim vás Opravite mi tento jednoduchí script //=== Začátek příběhu ========================================================== #include #pragma tabsize 0 //=== Definice ================================================================= #define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1 //=== prikaz =========================================================== public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(weapon, 6); return 0; } //=== menu dialogu ===================================================================== dcmd_weapon(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno",""); return 1; } //=== Dialog =================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 7542) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno",""); } if(listitem == 1) { ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno",""); } } } if(dialogid == 5522) { if(response) { if(listitem == 0) { GivePlayerWeapon(playerid, 1, 0); } if(listitem == 1) { GivePlayerWeapon(playerid, 5, 0); } if(listitem == 2) { GivePlayerWeapon(playerid, 4, 0); } if(listitem == 3) { GivePlayerWeapon(playerid, 8, 0); } if(listitem == 4) { GivePlayerWeapon(playerid, 9, 0); } if(listitem == 5) { GivePlayerWeapon(playerid, 41, 500); } if(listitem == 6) { GivePlayerWeapon(playerid, 43, 500); } } } if(dialogid == 5523) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť"); } if(listitem == 1) { GivePlayerWeapon(playerid, 23, 200); } if(listitem == 2) { GivePlayerWeapon(playerid, 24, 200); } } } if(dialogid == 8956) //ID Dialógu { if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo) { GivePlayerWeapon(playerid, 22, "%s", Jmeno(playerid)); } else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo) { //Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo. } } return 0; } stock naboje(playerid) { new str[128]; format(str,128,"%s",inputtext); //Formát return str; } //=== Konec příběhu =========================================================== Vopred Dakujem!!! Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 18. Únor, 2012 Share Odesláno: 18. Únor, 2012 moc sem na to nekoukal sem se na to ale co je tohle? dcmd(weapon, 6); dej tam dcmd(weapon,6, cmdtext); Link to comment Share on other sites More sharing options...
0 DooM 93 Odesláno: 18. Únor, 2012 Share Odesláno: 18. Únor, 2012 //=== Začátek příběhu ========================================================== #include #pragma tabsize 0 //=== Definice ================================================================= #define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1 //=== prikaz =========================================================== public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(weapon, 6); return 0; } //=== menu dialogu ===================================================================== dcmd_weapon(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno",""); return 1; } //=== Dialog =================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 7542) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno",""); } if(listitem == 1) { ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno",""); } } } if(dialogid == 5522) { if(response) { if(listitem == 0) { GivePlayerWeapon(playerid, 1, 0); } if(listitem == 1) { GivePlayerWeapon(playerid, 5, 0); } if(listitem == 2) { GivePlayerWeapon(playerid, 4, 0); } if(listitem == 3) { GivePlayerWeapon(playerid, 8, 0); } if(listitem == 4) { GivePlayerWeapon(playerid, 9, 0); } if(listitem == 5) { GivePlayerWeapon(playerid, 41, 500); } if(listitem == 6) { GivePlayerWeapon(playerid, 43, 500); } } } if(dialogid == 5523) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť"); } if(listitem == 1) { GivePlayerWeapon(playerid, 23, 200); } if(listitem == 2) { GivePlayerWeapon(playerid, 24, 200); } } } if(dialogid == 8956) //ID Dialógu { if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo) { GivePlayerWeapon(playerid, 22,999); } else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo) { //Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo. } } return 0; } stock naboje(playerid) { new str[128]; format(str,128,"%s",inputtext); //Formát return str; } //=== Konec příběhu =========================================================== priste pridej error at nemusime projizdet cely skript Link to comment Share on other sites More sharing options...
0 martinesik 0 Odesláno: 18. Únor, 2012 Author Share Odesláno: 18. Únor, 2012 ja som to chcel tak aby si do imput dialogu zadal pocet nabojov vies tamto tam malo ist ale nefungovalo to Link to comment Share on other sites More sharing options...
0 Sweet 7 Odesláno: 18. Únor, 2012 Share Odesláno: 18. Únor, 2012 //=== Začátek příběhu ========================================================== #include #pragma tabsize 0 //=== Definice ================================================================= #define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1 //=== prikaz =========================================================== public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(weapon, 6); return 0; } //=== menu dialogu ===================================================================== dcmd_weapon(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno",""); return 1; } //=== Dialog =================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 7542) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno",""); } if(listitem == 1) { ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno",""); } } } if(dialogid == 5522) { if(response) { if(listitem == 0) { GivePlayerWeapon(playerid, 1, 0); } if(listitem == 1) { GivePlayerWeapon(playerid, 5, 0); } if(listitem == 2) { GivePlayerWeapon(playerid, 4, 0); } if(listitem == 3) { GivePlayerWeapon(playerid, 8, 0); } if(listitem == 4) { GivePlayerWeapon(playerid, 9, 0); } if(listitem == 5) { GivePlayerWeapon(playerid, 41, 500); } if(listitem == 6) { GivePlayerWeapon(playerid, 43, 500); } } } if(dialogid == 5523) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť"); } if(listitem == 1) { GivePlayerWeapon(playerid, 23, 200); } if(listitem == 2) { GivePlayerWeapon(playerid, 24, 200); } } } if(dialogid == 8956) //ID Dialógu { if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo) { if(!response || !IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFAA, "Nezadal jsi zadny text!"); //bude se ti hodit GivePlayerWeapon(playerid, 22, strval(inputtext)); //koukej kde byla chyba } else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo) { //Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo. } } return 0; } stock naboje(playerid) { new str[128]; format(str,128,"%s",inputtext); //Formát return str; } stock IsNumeric(const string[]) { new length=strlen(string); if (length==0) return false; for (new i = 0; i < length; i++) { if ( (string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') || (string[i]=='-' && i!=0) || (string[i]=='+' && i!=0) ) return false; } if (length==1 && (string[0]=='-' || string[0]=='+')) return false; return true; } //=== Konec příběhu =========================================================== Link to comment Share on other sites More sharing options...
0 martinesik 0 Odesláno: 18. Únor, 2012 Author Share Odesláno: 18. Únor, 2012 //=== Začátek příběhu ========================================================== #include #pragma tabsize 0 //=== Definice ================================================================= #define dcmd(%1,%2) if(!strcmp(cmdtext[1], #%1, true, (%2)) && (((cmdtext[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || ((cmdtext[(%2) + 1] == ' ') && (dcmd_%1(playerid, cmdtext[(%2) + 2]))))) return 1 //=== prikaz =========================================================== public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(weapon, 6); return 0; } //=== menu dialogu ===================================================================== dcmd_weapon(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid, 7542, DIALOG_STYLE_LIST, "Weapons Menu", "{#ffd700}Ručné\n{#ffd700}Pištole\n{#ffd700}Smg","Storno",""); return 1; } //=== Dialog =================================================================== public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 7542) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid, 5522, DIALOG_STYLE_LIST, "Ručné", "{#000080}Boxer\n{#000080}Palka\n{#000080}Nož\n{#000080}Katana\n{#000080}Motorova píla\n{#000080}Sprej\n{#000080}Fotoaparat","Storno",""); } if(listitem == 1) { ShowPlayerDialog(playerid, 5523, DIALOG_STYLE_LIST, "Pištole", "{#000080}9mm\n{#000080}9mm s tlmičom\n{#000080}Desert Eagle","Storno",""); } } } if(dialogid == 5522) { if(response) { if(listitem == 0) { GivePlayerWeapon(playerid, 1, 0); } if(listitem == 1) { GivePlayerWeapon(playerid, 5, 0); } if(listitem == 2) { GivePlayerWeapon(playerid, 4, 0); } if(listitem == 3) { GivePlayerWeapon(playerid, 8, 0); } if(listitem == 4) { GivePlayerWeapon(playerid, 9, 0); } if(listitem == 5) { GivePlayerWeapon(playerid, 41, 500); } if(listitem == 6) { GivePlayerWeapon(playerid, 43, 500); } } } if(dialogid == 5523) { if(response) { if(listitem == 0) { ShowPlayerDialog(playerid,8956,DIALOG_STYLE_INPUT,"Naboje","Zadajte počet nabojov:","Potvrdit","Zrušiť"); } if(listitem == 1) { GivePlayerWeapon(playerid, 23, 200); } if(listitem == 2) { GivePlayerWeapon(playerid, 24, 200); } } } if(dialogid == 8956) //ID Dialógu { if(response == 1) //Tlačidlo 1 (Ľavé tlačidlo) { if(!response || !IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFFFFFFAA, "Nezadal jsi zadny text!"); //bude se ti hodit GivePlayerWeapon(playerid, 22, strval(inputtext)); //koukej kde byla chyba } else if(response == 0) //Tlačidlo 2 (Pravé tlačidlo) { //Funkcia ktorá sa vykoná ak stlačí na druhé (Pravé) tlačidlo. } } return 0; } stock naboje(playerid) { new str[128]; format(str,128,"%s",inputtext); //Formát return str; } stock IsNumeric(const string[]) { new length=strlen(string); if (length==0) return false; for (new i = 0; i < length; i++) { if ( (string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') || (string[i]=='-' && i!=0) || (string[i]=='+' && i!=0) ) return false; } if (length==1 && (string[0]=='-' || string[0]=='+')) return false; return true; } //=== Konec příběhu =========================================================== Dakujem ti za radu !!!! Si velmi mudri muz ale mam este jednu prozbu chcel by som to dat aj na ine zbrane tak od kadial to mam skopirovat mislim v tom fs????!!!!! Link to comment Share on other sites More sharing options...
0 XXXKiller 0 Odesláno: 19. Únor, 2012 Share Odesláno: 19. Únor, 2012 Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ? Link to comment Share on other sites More sharing options...
0 Laces 15 Odesláno: 19. Únor, 2012 Share Odesláno: 19. Únor, 2012 Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ? prečo to pišes do cudzieho topiku? Link to comment Share on other sites More sharing options...
0 VcT_peter 0 Odesláno: 19. Únor, 2012 Share Odesláno: 19. Únor, 2012 Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ? prečo to pišes do cudzieho topiku? jak do zleho topiku sak do help to napisal ci ? ci mne zle ukazuje ??? Link to comment Share on other sites More sharing options...
0 Ad@m 0 Odesláno: 19. Únor, 2012 Share Odesláno: 19. Únor, 2012 Nevieš ako tam dať ine zbrane? Tak potom ako si tam dal tie prve? :DHmm typujem že si tento script neurobil ty... Link to comment Share on other sites More sharing options...
0 martinesik 0 Odesláno: 21. Únor, 2012 Author Share Odesláno: 21. Únor, 2012 Nevieš ako tam dať ine zbrane? Tak potom ako si tam dal tie prve? :DHmm typujem že si tento script neurobil ty... urobil len dalej je tam is numeric a neviem s tim robit Link to comment Share on other sites More sharing options...
0 martinesik 0 Odesláno: 21. Únor, 2012 Author Share Odesláno: 21. Únor, 2012 Tak mam jednu chybu v mode: C:\Documents and Settings\kosar\Desktop\The Godfather\gamemode\gf.pwn(24793) : error 004: function "NameTimer" is not implemented A tu je riadok: NameTimer(); ako to opravim ? prečo to pišes do cudzieho topiku? jak do zleho topiku sak do help to napisal ci ? ci mne zle ukazuje ??? laces len pise ze to dal do mojho topiku a neurobi si vlasni tak to mislel ze cudzi topik. Link to comment Share on other sites More sharing options...
Dotaz
martinesik 0
Prosim vás Opravite mi tento jednoduchí script
Vopred Dakujem!!!
Link to comment
Share on other sites
11 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now