OnPlayerWeaponShot not recognizing minigun
#10

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Okay, I am just wondering how the script could even work ?
The only possiblilty is that you don't use any other objects in this server, do you?

To fix that just change that if statment into a loop
pawn Код:
//OnPlayerWeaponShot
if( hitid == MinigunInfo[hitid][Object] )
// into
for(new i = 0; i < MAX_MINIGUNS; i++)
{
    if(hitid == MinigunInfo[i][Object])
    {
        // the remaining code
        return 1; // or break;
    }
}
I also noticed that you do in DestroyMinigun
pawn Код:
MinigunInfo[i][IsSpawned] = -1;
// but it should be
MinigunInfo[i][IsSpawned] = 0;
Worked, thanks.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)