OnPlayerWeaponShot bugs my Tazer
#1

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
Reply
#2

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

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

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
Reply
#4

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

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.
Reply
#6

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;

Reply
#7

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.
Reply
#8

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

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);
}
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)