OnPlayerShootDynamicObject issue
#1

Alright so there is one problem with this, it will delete the entire map for some reason.

PHP Code:
public OnPlayerShootDynamicObject(playeridweaponidobjectidFloat:x,Float:y,Float:z) {
    for(new 
0sizeof(dInfo); i++) {
        if(
objectid == dInfo[i][DeerObject]) {
            if(
IsValidDynamicObject(dInfo[i][DeerObject])) {
            
                new 
Float:Pos[3];
                
GetDynamicObjectPos(dInfo[i][DeerObject],Pos[0],Pos[1],Pos[2]);
                new 
Float:rr frandomEx(1.00,10.00);
                
CreateMeatObject(rr,Pos[0],Pos[1],Pos[2],0.0,0.0,0.0);
                
SetDynamicObjectPos(dInfo[i][DeerObject],0.0,0.0,2500.0);
                
DestroyDynamicObject(dInfo[i][DeerObject]);
                
printf("Breaking object ID: %i",objectid);
                break;
            }
        }
    }
    
printf("Breaking object ID: %i",objectid);
    return 
1;

It will only print the object ID that it has destroyed but it will destroy all CreateDynamicObject
Reply


Messages In This Thread
OnPlayerShootDynamicObject issue - by TwinkiDaBoss - 07.06.2016, 13:36
Re: OnPlayerShootDynamicObject issue - by IstuntmanI - 07.06.2016, 14:13
Re: OnPlayerShootDynamicObject issue - by TwinkiDaBoss - 07.06.2016, 19:38
Re: OnPlayerShootDynamicObject issue - by TwinkiDaBoss - 07.06.2016, 19:58

Forum Jump:


Users browsing this thread: 2 Guest(s)