fixes.inc

13 de mai. de 2012.
fixes.inc

Soluções de bugs do SA:MP escritos pela comunidade.

Introdução

SA:MP é um software beta escrito por uma pequena equipe no seu tempo livre, portanto, ela tem bugs (como faz todo o software). Alguns destes são conhecidos há muito tempo, mas são de baixa prioridade, devido aos seus efeitos secundários, outros são descobertos por um longo período de tempo. Muitos destes erros têm soluções que podem ser implementadas (isto pode ser mais simples do que implementá-las no código fonte do SA:MP). Esta include visa recolher as correções para muitos destes erros (ou seja, alguém que tem uma correção), isto trara um beneficio para todos.

Download

Versão estável atual:

http://pastebin.com/6rf01BNS

Modo de Uso

Para usar, basta incluí-la após o padrão SA:MP funções:
pawn Code:
#include <a_samp> // Any default re-definitions should go here. //#undef MAX_PLAYERS //#define MAX_PLAYERS 10 #include <fixes> #include <other>

Para desabilitar qualquer correção por qualquer motivo, simplesmente faça:
pawn Code:
#define FIX_<name> 0

Por exemplo, para desabilitar todas as correções do file.inc, faça:
pawn Code:
#include <a_samp> #define FIX_file_inc 0 #include <fixes> #include <other>

Todos os nomes de que as correcções são palavras simples, e estão todos listados com suas descrições de correção abaixo.

Se você só tem um script rodando em seu servidor (ou seja, sem FilterScript), você pode usar essa definição para melhorar o código:
pawn Code:
#include <a_samp> #define FIXES_Single 1 #include <fixes> #include <other>

Correções
Quote:
Originally Posted by Y_Less View Post

Name
Bug
Authour
Post
Officially Fixed?
GetPlayerColorReturns "0" if "SetPlayerColor" has never been called.KoczkaHUNLink
FILTERSCRIPTDespite the fact that is in every new script, many people don't define "FILTERSCRIPT" where appropriate.Y_Less
SpawnPlayerKills the player if they are in a vehicle.Y_Less
SetPlayerNameUsing "SetPlayerName" when the new name only differs from the old name in case does not alter the name at all.Y_Less
GetPlayerSkinReturns the new skin after "SetSpawnInfo" is called but before the player actually respawns to get the new skin.Y_Less
GetWeaponNameReturns nothing for 18, 44, and 45.Y_Less
SetPlayerWorldBoundsAiming can bypass the edge.Y_Less
TogglePlayerControllableOther players see you moving on the spot.SliceLink
HydraSniperEntring military aircraft with a sniper rifle messes up vies.funky1234Link
IsPlayerInCheckpointFunction returns an undefined value if it is called before any other checkpoint functions are called to initialise the value.Y_Less
IsPlayerInRaceCheckpointFunction returns an undefined value if it is called before any other race checkpoint functions are called to initialise the value.Y_Less
GetPlayerWeaponReturns the old value after using "SetPlayerArmedWeapon" when they are in a vehicle.Y_Less
PutPlayerInVehicleIf this is used on a passenger the driver of their old vehicle doesn't see them in their new vehicle.leong124/Y_LessLink
KEY_AIM"KEY_AIM" isn't defined by default.Y_Less
SetPlayerCheckpointIf a checkpoint is already set it will use the size of that checkpoint instead of the new one.KoczkaHUNLink
SetPlayerRaceCheckpointIf a checkpoint is already set it will use the size of that checkpoint instead of the new one.KoczkaHUNLink
TextDrawCreateCrashes on a blank string.wupsLink
TextDrawSetStringCrashes on a blank string and size greater than 1024.TomTroxLink
AllowInteriorWeaponsDoes nothing.KoczkaHUNLink
OnPlayerEnterVehicleCrashes other players when people enter an invalid seat.RyDeR`/Y_LessLink
AllowTeleport0.3dRC9 removed "AllowPlayerTeleport" and "AllowAdminTeleport" in favour of "OnPlayerClickMap". Some scripts used the old code and.Y_Less
SetPlayerSpecialActionRemoving jetpacks from players by setting their special action to 0 causes the sound to stay until death.MP2PM.
OnDialogResponseCheaters can spoof the dialogid they are using to respond to ones they can't actually see.Y_Less0.3e RC6
GetPlayerDialogThis function doesn't exist.Y_Less
SetSpawnInfoKicks the player if "SpawnPlayer" is called before "SetSpawnInfo".Y_Less
SetPlayerSkinBreaks sitting on bikes.CyNiCLink
HideMenuForPlayerCrashes when passed an invalid menu ID.Y_LessLink
valstrCrashes on large numbers.SliceLink
fcloseCrashes on an invalid handle.SliceLink
fwriteCrashes on an invalid handle.SliceLink
freadCrashes on an invalid handle.SliceLink
fputcharCrashes on an invalid handle.SliceLink
fgetcharCrashes on an invalid handle.SliceLink
fblockwriteCrashes on an invalid handle.SliceLink
fblockreadCrashes on an invalid handle.SliceLink
fseekCrashes on an invalid handle.SliceLink
flengthCrashes on an invalid handle.SliceLink
file_incAll file.inc fixes are included separately for major overhead.Y_Less
IsPlayerAttachedObjectSlotUsedDoesn't work in OnPlayerDisconnect.Y_LessLink
SetPlayerAttachedObjectDoesn't remove objects when the mode ends.Y_LessLink
OnPlayerDeathClients get stuck when they die with an animation applied.h02Link
Expansão

O arquivo é muito bem documentado, com uma lista dos bugs (espero) fixados no topo. Se você souber de outros, ou ter soluções para os outros, seria muito apreciada, se você pode publicá-las neste tópico (seguindo a estrutura já estabelecidos). As correções também precisa de extensos testes para encontrar bugs nas correções.

Novamente, este é um projeto da comunidade, apenas geridos por Y_Less - que alguém tenha comentários, contribuições, críticas, etc por favor poste neste tópico. Isto inclui adições ao código-fonte, documentação, apresentação, tradução (principalmente deste post - várias versões de inclusão devem ser evitados para reduzir a fragmentação), ou qualquer outra área relacionada com você pode pensar.

Traduções

English(Oficial)
Balcan

Note que estes são apenas traduções tópico - a fonte é sempre o mesmo. Por favor também postar quaisquer acréscimos no tópico original em Inglês de outra forma que não pode ser visto.

Outras correções

Existem alguns outros inclui que visam corrigir problemas grandes demais para serem incluídos aqui:

SQLitei - correções e melhorias para muitas funções SQLite
Timer Fix - Correções para fazer "SetTimer" e "SetTimerEx" muito mais precisos em seus atrasos.

Bugs


Este software é projetado explicitamente para resolver bugs não, levá-los, mas lembrando que ainda pode haver bugs.

A causa mais provável de bugs é certas combinações de correções com deficiência. Algumas correções são inter-misturados e ao mesmo tempo devem trabalhar quando as correções são combinadas com são deficientes, não cada combinação foi testada.

0 comentários:

Postar um comentário