Destroying a certain object
#1

Hello,im trying to create a drug system. The point of it is it creates a global object after player /plant it.And the command /harvest should destroy it and give drugs.But it doesn't destroy it,nor give drugs. Here's the command:
pawn Code:
CMD:harvest(playerid,params[])
{
    new Float:x,Float:y,Float:z;
    GetObjectPos(3409,x,y,z);
    if(IsPlayerInRangeOfPoint(playerid,5,x,y,z))
    {
        new rand = random(5);
        DestroyObject(3409);
        PlayerInfo[playerid][Marijuana]=PlayerInfo[playerid][Marijuana] + rand;
        SaveStats(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
Destroying a certain object - by dusk - 16.02.2013, 11:16
Re: Destroying a certain object - by DaRk_RaiN - 16.02.2013, 11:21
Re: Destroying a certain object - by dusk - 16.02.2013, 11:22
Re: Destroying a certain object - by DaRk_RaiN - 16.02.2013, 11:25
Re: Destroying a certain object - by dusk - 16.02.2013, 11:59
Re: Destroying a certain object - by DaRk_RaiN - 16.02.2013, 12:02
Re: Destroying a certain object - by dusk - 16.02.2013, 12:16
Re: Destroying a certain object - by DaRk_RaiN - 16.02.2013, 12:18
Re: Destroying a certain object - by dusk - 16.02.2013, 12:33
Re: Destroying a certain object - by Babul - 16.02.2013, 13:11

Forum Jump:


Users browsing this thread: 1 Guest(s)