php unscrambler API (NOT A cleo/prog) (for lsrp and gms with unscramble required)

0x32789

Well-Known Member
Joined
May 26, 2014
Messages
761
Likes
2
Points
68
Location
teknickal suprot
#1
I had this unscramble api made with a looot of help from stackoverflow, google and many websites and my shit php skills.
but this shit works
80% of this is made using copy pasta.
with this you can make a unscrambler for lsrp using samp funcs and http functions, all you need to do is host the api somewhere or at ur own pc for fast response and send http requests (post/get)
you can give it a list of words, I took one from google containing 467k words and its not instant but its still fast.
too bad there is no samp funcs in 0.3.DL but you can still do it with cleo  I think.

anyways here.
[attachment=5403]

I've tested the api with chrome and pawn
pawn code for testing:
Code:
forward public UpdateResponse_UNS(playerid, response_code, data[]);

public UpdateResponse_UNS(playerid, response_code, data[])
{

    if(response_code == 200)
    {
        SFM(playerid, COLOR_WHITE, "Unscrambled: {00CCFF}%s", data);
    }
    else
    {
        SFM(playerid, COLOR_WHITE, data);
    }
}

CMD:unscramble(playerid, params[])
{
new pr2[128];
if(sscanf(params, "s[128]", pr2)) return SFM(playerid, COLOR_RED, "/unscramble [word]");
    HTTP(playerid, HTTP_GET, sprintf("localhost/uns/unscramble.php?scrambled=%s", pr2), "", "UpdateResponse_UNS");
return 1;
}
some screens of test





You can have a word list containing characters from a server scrambled word and compile them together so then later you can have a accurate list for a specific server.
 

Attachments

Top