Bugs (1st thread RC3-RC6)
#81

SetPlayerFacingAngle on player TP in property system is bugged, worked on 0.2x, not working correctly in 0.34-RC6-2. I saw a fix, but it doesnt shoow as fixed.. there is offset in seted angle for 90 degrees 2/3 times tried on random TPs.
Reply
#82

- If you havent assigned something if(!response) in OnDialogResponse, and there is another filterscript which has if(!response) assigned somewhere... then, when you click the 2nd button of 1st filterscript, you will see the result as the one in 2nd filterscript...
quite difficult to explain...
eg.
1st filterscript
Quote:

OnDialogResponse(..)
{
if(response) SendClientMessage(playerid,red,"You pressed 1st button of 1st fs"); return 1; // But you do not assign anything to if(!response)
}

2nd filterscript;
Quote:

OnDialogResponse(...)
{
if(response) SendClientMessage(playerid,red,"you pressed 1st button of 2nd fs"); return 1;
if(!response) return SendClientMessage(playerid,red,"You pressed 2nd button of 2nd FS"); // this one has both things assigned, when response==1 and when response==0;
}

So, now if you open the dialog box of 1st FS, and press the 2nd Button which means Response==0. You will see a message "You pressed 2nd button of 2nd fs"....

i hope i explained enough...!


WTF? i knew another bug ... damn it...
will get back as soon as i remember it again

EDIT: The bug i reported is not just while we have dialogs in different Filterscripts... it exists even if the dialogs are in same FS
Reply
#83

Quote:
Originally Posted by [url]https://sampwiki.blast.hk/wiki/OnRconLoginAttempt
[/url]
OnRconLoginAttempt(ip[], password[], success)

Note: This callback works only for in-game RCON, if you want to disable the remote RCON, add rcon 0 to the server.cfg
This doesn't make sense... if it's only for people in-game, why doesn't it pass a playerid instead of the ip. Does this mean there's no way to block repeated bad login attempts from remote RCON? Also, shouldn't IsPlayerAdmin return true for the player who just logged in inside this callback?
Reply
#84

That assumes there's only one person in the server with that IP. The only guaranteed way of checking which player just logged in is to call IsPlayerAdmin and see if they were not previously an admin, which requires a timer since IsPlayerAdmin doesn't return true inside the callback. Somewhat unrelated,
pawn Код:
new IP[15];
should be
pawn Код:
new IP[16];
Reply
#85

Actually, this is for if they're successful.
Reply
#86

Quote:
Originally Posted by Abhishek
- If you havent assigned something if(!response) in OnDialogResponse, and there is another filterscript which has if(!response) assigned somewhere... then, when you click the 2nd button of 1st filterscript, you will see the result as the one in 2nd filterscript...
quite difficult to explain...
eg.
1st filterscript
Quote:

OnDialogResponse(..)
{
if(response) SendClientMessage(playerid,red,"You pressed 1st button of 1st fs"); return 1; // But you do not assign anything to if(!response)
}

2nd filterscript;
Quote:

OnDialogResponse(...)
{
if(response) SendClientMessage(playerid,red,"you pressed 1st button of 2nd fs"); return 1;
if(!response) return SendClientMessage(playerid,red,"You pressed 2nd button of 2nd FS"); // this one has both things assigned, when response==1 and when response==0;
}

So, now if you open the dialog box of 1st FS, and press the 2nd Button which means Response==0. You will see a message "You pressed 2nd button of 2nd fs"....

i hope i explained enough...!


WTF? i knew another bug ... damn it...
will get back as soon as i remember it again

EDIT: The bug i reported is not just while we have dialogs in different Filterscripts... it exists even if the dialogs are in same FS
You didn't get the point.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
      case 1000:
      {
        if(response)
        {
                //dialog ID 1000 when response is 1
        }
        else
        {
                //dialog ID 1000 when response is 0
        }
      }
    }
  return 1;
}
You need to base your returns on dialog IDs.
Reply
#87

SetPlayerPos won't work on player standing on a vehicle. He will remain on it.
Reply
#88

GetPlayerWeaponData just NEEDS to be fixed..
sorry to say it like this, but anything I want to make that involves weapons, is impossible...

if you think this isn't a major bug and it won't get fixed in 0.3:
can anyone post here pls tell me When this bug occurs?
I tried to get to know when it does,.. it seems to happen when you scroll weapons, but it's just so randomly?
there is no specific Action that causes the bug.. ?

or is the problem just that you don't know how to fix it?

it looks like when it returns 0 or -1, I still see the correct ammo in the HUD
so I guess there's nothing wrong with GTA itself, so the problem should be fixable?
Reply
#89

Quote:
Originally Posted by °ғαιιοцт°
GetPlayerWeaponData just NEEDS to be fixed..
sorry to say it like this, but anything I want to make that involves weapons, is impossible...

if you think this isn't a major bug and it won't get fixed in 0.3:
can anyone post here pls tell me When this bug occurs?
I tried to get to know when it does,.. it seems to happen when you scroll weapons, but it's just so randomly?
there is no specific Action that causes the bug.. ?

or is the problem just that you don't know how to fix it?

it looks like when it returns 0 or -1, I still see the correct ammo in the HUD
so I guess there's nothing wrong with GTA itself, so the problem should be fixable?
GetPlayerWeaponData returns -1 when the server doesn't recieve the information from the client quick enough. It isn't a bug, it is just because of lag. How can it tell you the data if it doesn't know it itself?
Reply
#90

Quote:
Originally Posted by BeckzyBoi
GetPlayerWeaponData returns -1 when the server doesn't recieve the information from the client quick enough. It isn't a bug, it is just because of lag. How can it tell you the data if it doesn't know it itself?
I tried with a timer at 800ms
GetPlayerWeaponData(); and SendClientMessage.

if I don't do anything, it just always works without any bug

from the moment I change my weapon (scroll) a few times, I Always get -1

so.. it doesn't return -1 because the client responds to slow....
it's Definitely something else


Quote:
Originally Posted by Seif_ [adream-rp.com
]
If it returns -1, can you do a while() loop? If it's lag, then it should fix itself right after, no?
as in my text above,
-1 just stays for ever untill I use GivePlayerWeapon again

this creates a never-ending while loop witch overflows the server (yes I tested it)
(I jused "goto" instead of a while loop)
Reply
#91

Well I am only saying what Kye told me. It used to be 65535 until 0.3RC2. But it is certainly not a bug. Just run the command a few times and one of the results will be correct.
Reply
#92

Quote:
Originally Posted by BeckzyBoi
Well I am only saying what Kye told me. It used to be 65535 until 0.3RC2. But it is certainly not a bug. Just run the command a few times and one of the results will be correct.
that's what I did..

Код:
Start:
GetPlayerWeaponData();
if(Ammo == -1)
{
  goto Start;
}
SendClientMessage Ammo = %i
it creates an infinite while loop that overflows the server.


also:

my output is this:

Quote:

Ammo = 0
Ammo = 0
Ammo = 0
Ammo = 0
Ammo = 0
Ammo = 0
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = 500
Ammo = -1
Ammo = -1
Ammo = -1
Ammo = -1
Ammo = -1
Ammo = -1
//start





//here I give myself ammo








//here I switched weapons

so if you say that it's caused by lag, it means that my connection is always perfect untill I switch weapons, and my connection gets bad after switching? .. Each time again, when I test this?

I'm just Not thinking this has anything to do with lag
it must be something else
Reply
#93

Well if you change weapons it is obviously going to be different. And melee weapons don't have ammo so they always return -1.
Reply
#94

Quote:
Originally Posted by BeckzyBoi
Well if you change weapons it is obviously going to be different. And melee weapons don't have ammo so they always return -1.
I always use GetPlayerWeaponData at the same slot
I'm not that stupid..
Reply
#95

Weapon slots 0, 1, 10, 11, 12 will always give -1 for the ammo but those weapons don't have ammo. Any other weapon slot will return -1 if the server doesn't recieve the client data fast enough so that it doesn't know the results.
Reply
#96

Quote:
Originally Posted by BeckzyBoi
Weapon slots 0, 1, 10, 11, 12 will always give -1 for the ammo but those weapons don't have ammo. Any other weapon slot will return -1 if the server doesn't recieve the client data fast enough so that it doesn't know the results.
I'm using weapondid 28 for testing this
and it's Impossible that before changing weapons, the data is always sent fase enough
and after changing weapons, the data is sent to slow

This is no coincidence because it happens Each time I did this test
Reply
#97

OnPlayerRequestClass is still called twice when a player connects and when they press F4 and die. This is really annoying.
Reply
#98

Quote:
Originally Posted by °ғαιιοцт°
GetPlayerWeaponData just NEEDS to be fixed..
sorry to say it like this, but anything I want to make that involves weapons, is impossible...

if you think this isn't a major bug and it won't get fixed in 0.3:
can anyone post here pls tell me When this bug occurs?
I tried to get to know when it does,.. it seems to happen when you scroll weapons, but it's just so randomly?
there is no specific Action that causes the bug.. ?

or is the problem just that you don't know how to fix it?

it looks like when it returns 0 or -1, I still see the correct ammo in the HUD
so I guess there's nothing wrong with GTA itself, so the problem should be fixable?
EHM

http://forum.sa-mp.com/index.php?top...5870#msg755870

Well. Just read this topic - all topic and you will find answers you want.
Reply
#99

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Quote:
Originally Posted by Luby
Quote:
Originally Posted by Seif_ [adream-rp.com
]
Quote:
Originally Posted by » Pawnst★r «
Quote:
Originally Posted by Seif_ [adream-rp.com
]
How about you set the player's position if he's firing with a weapon?
Explain ..
pawn Код:
public OnPlayerUpdate(playerid)
{
    new keys, updown, leftright;
    GetPlayerKeys(playerid, keys, updown, leftright);
    if (keys & KEY_FIRE && GetPlayerWeapon(playerid) == WEAPON_ROCKETLAUNCHER)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        SetPlayerPos(playerid, X, Y, Z);
    }
    return 1;
}
This way, the player can't shoot with it, however people WILL see him with the weapon.
It is not better to use freeze or race checkpoint?
Race checkpoint...?

Freezing isn't better, because it's bugged and others see players moving and doing actions but staying at the same position. Meaning if you're frozen with a minigun, you can press fire key and people will see him firing the minigun.
If somebody enter race ceckpoint on foot, he will stop running and shooting, you can try StopAnimation too, at freeze, I mean freeze and unfreeze at one time, it should prevent to shoot, and also it can be used to avoid car-enter (on enter freeze and unfreeze prevents from entering a car)
Reply

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Yes, just like SetPlayerPos. I never knew entering race checkpoints on foot automatically does that.
Do SetPlayerPos have delay? I noticed that if you teleport, other players will see you after some seconds in place where you teleported to.
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)