[FilterScript] San Andreas Singleplayer cheats[cmd based and text based]
#1


Explanations
-It's just I was messing the old days in SA Singleplayer, and though of bringing them back with this filterscript, this one will give you the ability to use the OLD cheats in SA-MP, not all of them but the few possible cheats only, it can be disabled or enabled by a command, and it's command based or text based aswell, the picture above show it all.

Commands
lxgiwyl - Weapon pack 1
professionalskit - Weapon pack 2
hesoyam - Armour + Health + 250,000$
goodbyecruelworld - Kill your self.
baguvix - Can't be killed.
aiwprton - Tank
cqzijmb - Blooding Banger
jqntdmh - Ranger
vrockpokey - Horing Racer #1
vpjtqwv - Horing Racer #2
celebritystatus - Limousin Stretch
truegrime - Trash truck
rzhsuew - Taxi
ohdude - Hunter
monstermash - Monster car
jumpjet - Hydra
rocketman - Jetpack
aiypwzpq - Parachute
pleasantlywarm - Good weather
alnsfmzo - Bad weather
cfvfgmj - Orange weather
cwjxuoc - Sable
cheatslist - Shows you all the cheats
cheats - to disable or enable the text based cheats
Installation
-Copy both SA_CHEATS.amx and SA_CHEATS.pwn to your fiterscript directory.
-Make sure you have zcmd inculde.
-Open your server file and add SA_CHEATS in filterscripts line.
-and viola enjoy.
Credits
-Hoss: For some useful tips (thanks bro <3)
-Kye: For SA-MP.
-Zeex: For ZCMD.
Improvements
-No more bugs.
-The Textdraws works perfectly now.
-More orgenized script.
Download
V2.0:
Pasteben
Mediafire
Enjoy
Reply
#2

If there is only a function that can make all buttons in the keyboard detectable.
Then it can be make it possible without using Chat Key ('T') then type the cheat code.
Reply
#3

Indeed, I heard they're considering making that function in 0.4..
Reply
#4

Nicely done
Good job
Reply
#5

thanks hossy
Reply
#6

nice 0.0
Reply
#7

Good job on this one. :3
Reply
#8

Thanks guys :3
Reply
#9

Not good I'm afraid. Why is a filterscript interfering with OnPlayerRequestClass? Why are processed commands returning 0? They should return 1. Why are you checking the 'canusecheats' variable for every command? You only need it once.

Also, the 'Cheat Activated' TD is stretched.
Reply
#10

Quote:
Originally Posted by MP2
View Post
Not good I'm afraid. Why is a filterscript interfering with OnPlayerRequestClass? Why are processed commands returning 0? They should return 1. Why are you checking the 'canusecheats' variable for every command? You only need it once.

Also, the 'Cheat Activated' TD is stretched.
Just forgot to delete it, not a big problem... I use basic ways and I don't make my filterscript complecated, it's for newbies I coded everything in a simple way and the commands are returning 1, but the text is returning 0 because it will return to false value when checking if he wrote it.
Reply
#11

Great job, I like it
Reply
#12

Very high quality, the best filter-script I've ever seen. I'm now using it in my server, thank you so much sir!
Reply
#13

Nice !
Reply
#14

Useful, rep+
Reply
#15

Thanks, btw read the server's name
Reply
#16

dont cheat play legit
Reply
#17

Nice job, well done!
Reply
#18

I'm afraid it's too inefficient.

First of all, you're using an ENUM for a SINGLE variable

pawn Код:
enum cInfo
{
bool:CanUseCheats
}
new Cheats[MAX_PLAYERS][cInfo];
CAN simply be

pawn Код:
new bool:CanUseCheats[MAX_PLAYERS];

ANND

pawn Код:
public OnPlayerText(playerid, text[])
{
        if(strcmp("lxgiwyl",text,true,1) == 0 &&  Cheats[playerid][CanUseCheats] == true)
        {
        GivePlayerWeapon(playerid, 5, 1);
        GivePlayerWeapon(playerid, 22, 999);
        GivePlayerWeapon(playerid, 25, 999);
        GivePlayerWeapon(playerid, 28, 999);
        GivePlayerWeapon(playerid, 35, 999);
        GivePlayerWeapon(playerid, 18, 999);
        CheatTD(playerid);
        return 0;
        }
}
Can simply be

pawn Код:
public OnPlayerText(playerid, text[])
{
        if(strcmp("lxgiwyl",text,true,1) == 0 &&  Cheats[playerid][CanUseCheats] == true)
        {
        cmd_lxgiwyl(playerid, "");
        return 0;
        }
}

ALSOOOOO
pawn Код:
stock CheatTD(playerid)
{
        TextDrawShowForPlayer(playerid, cheattd);
        SetTimer("EndCheat", 5000, false);
        return 1;
}
IS PLAIN WRONG

because

pawn Код:
public EndCheat(playerid)
{
        TextDrawHideForPlayer(playerid, cheattd);
        return 1;
}
has a parameter.

And using TIMERS with parameters requires you to use SetTimerEx

SOOO

we change

pawn Код:
stock CheatTD(playerid)
{
        TextDrawShowForPlayer(playerid, cheattd);
        SetTimer("EndCheat", 5000, false);
        return 1;
}
this
to
pawn Код:
stock CheatTD(playerid)
{
        TextDrawShowForPlayer(playerid, cheattd);
        SetTimerEx("EndCheat", 5000, false, "d", playerid);
        return 1;
}
BUT, I do like the idea of implementing the single-player cheats like this using OnPlayerText.

Some points I'd like to see improved -

Better indentation
Usage of array's
custom cheat ID's
permissions for using EACH cheat SEPARATELY for each player
Reply
#19

Nice!
Reply
#20

Good job dude
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)