PDA

View Full Version : [FilterScript] [FS] SA:MP Bugs Fixer


Amit_B
07/04/2008, 04:48 PM
SA:MP Bugs Fixer
----------------
Programmer: Amit "Amit_B" Barami
Creation Data: 7/4/2008
Compatibility: SanAndreas:MultiPlayer 0.2.X

Fixed Bugs [*1]
---------------
* "reason" does nothing in OnVehicleDeath. [*2]
* OnRconCommand only works in filterscripts. [*3]
* GetPlayerColor returns 0 if SetPlayerColor hasn't been used.
* SpawnPlayer wont work if the player is in a vehicle. [*4]
* GetWeaponName doesn't work for IDs 18, 44 and 45. [*5]

*1 - From http://forum.sa-mp.com/index.php?topic=45184.msg328729#msg328729.
*2 - Just change the "OnVehicleDeath" function in your gamemode to "OnVehicleDeath2".
*3 - Just change the "OnRconCommand" function in your gamemode to "OnRconCommand2".
*4 - Just change all the "SpawnPlayer(xxx)" functions in your gamemode to "CallRemoteFunction("SpawnPlayer2","d",xxx)" (by pressing CTRL+H).
*5 - Just change all the "GetWeaponName(aaa,bbb,ccc)" functions in your gamemode to "GetWeaponName2(aaa,bbb,ccc)" (by pressing CTRL+H).

Downloads:
http://samp-il.co.cc/amit_b/files/BugsFixer.rar

Antironix
07/04/2008, 04:52 PM
Can you give some more information what it exactly does exept "bug fixing"

kaisersouse
07/04/2008, 04:55 PM
Can you give some more information what it exactly does exept "bug fixing"

one of the many reasons why source is required...so you can look yourself.

Antironix
07/04/2008, 05:00 PM
Can you give some more information what it exactly does exept "bug fixing"

one of the many reasons why source is required...so you can look yourself.


Lazyness -_-"

Amit_B
07/04/2008, 05:02 PM
Can you give some more information what it exactly does exept "bug fixing"

You can see here (http://forum.sa-mp.com/index.php?topic=45184.msg328729#msg328729) the SA:MP bugs.
This filterscript fixing 5 of them.
read the comment.

yom
07/04/2008, 05:14 PM
What is that:

public OnRconCommand(cmd[])
{
CallRemoteFunction("OnRconCommand2","s",cmd);
return 1;
}



You can just do

public OnRconCommand(cmd[])
return 0;

to fix it.

Amit_B
07/04/2008, 05:55 PM
What is that:

public OnRconCommand(cmd[])
{
CallRemoteFunction("OnRconCommand2","s",cmd);
return 1;
}



You can just do

public OnRconCommand(cmd[])
return 0;

to fix it.

OnRconCommand is not working on gamemodes.
my code fix it.

* OnRconCommand only works in filterscripts. [*3]
*3 - Just change the "OnRconCommand" function in your gamemode to "OnRconCommand2".

yom
07/04/2008, 06:15 PM
As i said, in your FS you can just do

public OnRconCommand(cmd[])
return 0;

to fix it for GMs

(and you return 1 which is very wrong)

Amit_B
07/04/2008, 07:11 PM
As i said, in your FS you can just do

public OnRconCommand(cmd[])
return 0;

to fix it for GMs

(and you return 1 which is very wrong)

no.. return 0; will just disable the rcon commands while the FS running..
see this:

Bug: OnRconCommand only works in filterscripts.
Reason: Unknown.
Solution: Add "public OnGMRconCommand" in your gamemode and use CallRemoteFunction from a filterscript to call it.

writed by Y_Less (http://forum.sa-mp.com/index.php?topic=45184.msg328729#msg328729).

yom
07/04/2008, 07:25 PM
Test it before assuming i say only bullshits..

And if you return 1, type lkjsihjofuhdfiuhf in console, it will not say "Unknow command/variable" or whatever the message is...you need to return 0, as in OnPlayerCommandText or most of callbacks.

Oh well, why i care anyway :roll:

g@k
07/04/2008, 10:03 PM
yom the best >:D

yom
07/04/2008, 10:12 PM
No i don't claim to be...i just like sharing my knowledges :) but sometimes it doesn't seem to be helpful

Alexel
09/04/2008, 03:58 PM
nice... :)

HACKHERS
16/05/2009, 08:06 PM
Link Was death

UsaBoy91
21/08/2009, 07:24 PM
New link please !

Rajeev
24/12/2009, 09:36 PM
Pastabin please or new link