SA-MP Forums Archive
OnPlayerWeaponShot bugs my Tazer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerWeaponShot bugs my Tazer (/showthread.php?tid=528178)



OnPlayerWeaponShot bugs my Tazer - shaun_baker - 26.07.2014

hi,
i have a bug :/

Video shows the bug:
https://www.youtube.com/watch?v=J7Na...ature=*********

PHP код:
if(tazer[playerid] ..... = 1)
{
     if(
hittype == 1)
     {
          
animfreeze -player etc...
     }
     else 
     {
          
remove tazer gun (sd pistol) and give Deagle back GameText
     
}

if any knows my problem pls post it,
thanks

ps: sry for my bad english


Re : OnPlayerWeaponShot bugs my Tazer - S4t3K - 26.07.2014

I still can't figure out what bug you experience.

Please explain, your video isn't very explicative (and is not in English).


AW: OnPlayerWeaponShot bugs my Tazer - shaun_baker - 26.07.2014

ok sry,

if i type /tazer = Variable = 1

public onplayerweaponshot ask if hittype == 1 Shooting on Player so Player is tazed
but i have ask "else{}" if i shoot on a InGame Spawned vehicle or object or nothing it does not give me the Deagle back

i hope u understand me


Re: OnPlayerWeaponShot bugs my Tazer - Don_Cage - 26.07.2014

It doesn't look like much of a bug since you don't even have a code that tries to do what you want


Re : OnPlayerWeaponShot bugs my Tazer - S4t3K - 26.07.2014

I do, so may we have the whole code ?
Cause a little algorithmic words won't help any of us to help you solving your problem.

If you are afraid of being stolen, don't worry then. No one wants a buggy code in his mode.


AW: OnPlayerWeaponShot bugs my Tazer - shaun_baker - 26.07.2014

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
weaponid == 23 && TazerCan[playerid] == 1)
    {
        if(
hittype == 1)
        {
            
//TazerPlayer
            
return 1;
        }
        else
        {
            
//GivePlayer Deagle back
            //GameText U dont hit a Player
            //Variable = 0
            
return 1;
        }
    }
    return 
1;




Re : OnPlayerWeaponShot bugs my Tazer - S4t3K - 26.07.2014

May we show the REAL code ?
We can't help you if you don't wanna be helped out.

And as I said, don't be affraid of being stolen.


AW: OnPlayerWeaponShot bugs my Tazer - shaun_baker - 26.07.2014

u dont understand me, the full code u dont need to understand my problem dude ....


Re: OnPlayerWeaponShot bugs my Tazer - coole210 - 26.07.2014

Try to call a timer to delay giving a deagle to the player?

pawn Код:
else
{
SetTimerEx("GivePlayerWeaponEx", 500, false, "iii", playerid, 24, 100);
}

forward GivePlayerWeaponEx(playerid, wep, ammo);
public GivePlayerWeaponEx(playerid, wep, ammo)
{
GivePlayerWeapon(playerid, wep, ammo);
}



AW: Re: OnPlayerWeaponShot bugs my Tazer - shaun_baker - 26.07.2014

Quote:
Originally Posted by coole210
Посмотреть сообщение
Try to call a timer to delay giving a deagle to the player?

pawn Код:
else
{
SetTimerEx("GivePlayerWeaponEx", 500, false, "iii", playerid, 24, 100);
}

forward GivePlayerWeaponEx(playerid, wep, ammo);
public GivePlayerWeaponEx(playerid, wep, ammo)
{
GivePlayerWeapon(playerid, wep, ammo);
}
Thats not my problem, Look the video, if i shoot a spawned vehicle, dont give weapon, if i shoot on a
serverside car i become weapon, then if i shoot on object or none ... i dont become to no weapon