AvestX 5 Odesláno: 30. Červen, 2009 Share Odesláno: 30. Červen, 2009 Cau lidi, pls. Vadí kdyš dám do každého příkazu if (strcmp("/prikaz", cmdtext, true, 10) == 0) s tim ture, 10) s tou desítkou Link to comment Share on other sites More sharing options...
0 AvestX 5 Odesláno: 30. Červen, 2009 Author Share Odesláno: 30. Červen, 2009 Nwte někdo ???????? Link to comment Share on other sites More sharing options...
0 Mischino19 2 Odesláno: 30. Červen, 2009 Share Odesláno: 30. Červen, 2009 ved vyskusaj ak to bude hadzat errory tak uvidis Link to comment Share on other sites More sharing options...
0 AvestX 5 Odesláno: 30. Červen, 2009 Author Share Odesláno: 30. Červen, 2009 nj ale kdys mam obojí tak mi je to neházý :-D Link to comment Share on other sites More sharing options...
0 Mischino19 2 Odesláno: 30. Červen, 2009 Share Odesláno: 30. Červen, 2009 jak oboji nechapem ta Link to comment Share on other sites More sharing options...
0 Adamos 1 Odesláno: 30. Červen, 2009 Share Odesláno: 30. Červen, 2009 ja to pouzivam takto if(strcmp(cmdtext, "/prikaz", true) == 0) Link to comment Share on other sites More sharing options...
0 癌癌癌 1 Odesláno: 30. Červen, 2009 Share Odesláno: 30. Červen, 2009 Víte vubec co je to strcmp?? Vsadim se, že aspoň polovina fora nevi o co jde tak vam to přiblížim: Compare two strings with each other, with options like ignoring capitals and the maximum length. Used a lot in OnPlayerCommandText. Porovná dva stringy s (každym/jakýkoli) jinym, s nastavením jako ignorovaní kapitálu a maximálni délku. Hodně použito v OnPlayerCommandText http://wiki.sa-mp.com/wiki/Scripting_Functions_Old#strcmp http://wiki.sa-mp.com/wiki/Function:strcmp Kdyby ještě někoho zajimalo: http://msdn.microsoft.com/en-us/library/bb759938(VS.85).aspx http://www.cplusplus.com/reference/clibrary/cstring/strcmp/ Přesněji příkaz strcmp if(strcmp(cmdtext,"/blabla",true) == 0) znamena že pokud je cmdtext stejny jako /blabla == return 0 .. a true znači že ignoruje jestli je zapnuty capslock nebo ne .. takže /blabla nebo /BLABLA nebo třeba i /bLaBlA (s tim return == 0 si nejsem jistej to si přečtěte na wiki) Link to comment Share on other sites More sharing options...
Dotaz
AvestX 5
Cau lidi, pls. Vadí kdyš dám do každého příkazu if (strcmp("/prikaz", cmdtext, true, 10) == 0) s tim ture, 10) s tou desítkou
Link to comment
Share on other sites
6 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