• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Library] command-guess
#1
command-guess

A guesser command who uses levenshtein distance algoritm written in pawn.
Now it's support ZCMD-like command processor!

Maybe if you want this to?support more command processor, just make an issue on my github?and i'll figure it out.


Usage:

PHP Code:
#include <a_samp>
#include <izcmd>
#include <command-guess>

main() {
? ? print(
"Script loaded");
}
public 
OnPlayerCommandPerformed(playeridcmdtext[], success) {
? ? if (!
success) {
? ? ? ? new 
? ? ? ? ? ? 
guessCmd[32];

? ? ? ? 
CommandGuess(guessCmdcmdtext);

? ? ? ? 
SendClientMessageEx(playerid, -1"{FF0000}ERROR:{FFFFFF} \"%s\" is not found, did you mean \"%s\"?"cmdtextguessCmd);
? ? ? ? return 
1;
? ? }
? ? return 
1;


Downloads:
GitHub Release
???? ???? ????? ?? ???????? ???? ?????, ?? ???? ???? ?? ?????? ?? ??? ???? ???? ???? ?? ??? ???? ??? ???? ??? ?? ?? ?????? ??????





  Reply
#2
Wow, that's a clever use. Reminds me of command line tools that suggest corrections.
Always keep in mind that a lot of people are active on this forum in their spare time.

They are sacrificing time they could easily spend on things they would rather do, to help you instead.

  Reply


Forum Jump: