Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Releases Libraries [Library] command-guess

 
  • 0 Vote(s) - 0 Average
Library command-guess
Tama
Offline

Burgershot Member
Posts: 41
Threads: 8
Joined: Sep 2019
Reputation: 1
Location: India
#1
2021-02-23, 10:55 AM (This post was last modified: 2021-02-23, 10:57 AM by Tama.)
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(playerid, cmdtext[], success) {
    if (!success) {
        new 
            guessCmd[32];

        CommandGuess(guessCmd, cmdtext);

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

Downloads:
GitHub Release
आपको अपने पापों पर पश्चाताप करना चाहिए, वे आपको नष्ट कर देंगे। आप कोई मौका नहीं खड़े हो रहे हैं। तुम उसके हाथ पर मर जाओगे। पछताना


Freaksken
Offline

open.mp Developer

Posts: 75
Threads: 4
Joined: Feb 2019
Reputation: 6
Location: Belgium
#2
2021-02-23, 11:34 AM
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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode