[Help] little weed system.
#10

I have changed all my code..
pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include "registration_system.pwn"

#define MAX_WEED 1000
#define MAX_WEED_PER_PLAYER 3
#define LIBRARY "BOMBER"
#define ANIMATION "BOM_Plant_Crouch_In"

enum piantainfo
{
    Float:poswx,
    Float:poswy,
    Float:poswz
}

new winfo[MAX_WEED][piantainfo];
new mariaobject[MAX_WEED];
new contopiante;

CMD:plantseed(playerid,params[])
{
    if(pinfo[playerid][seeds] < 5) return SendClientMessage(playerid,-1,"[SERVER]You havn't sufficient seeds for plant");
    new id = contopiante;
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid,x,y,z);
    winfo[id][poswx] = x;
    winfo[id][poswy] = y;
    winfo[id][poswz] = z;
    mariaobject[id] = CreateObject(3409,x,y,z,0.0,0.0,0.0,100);
    contopiante++;
    return 1;
}

CMD:pickweed(playerid,params[])
{
    for(new i = 0; i < MAX_WEED; i++)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.0,winfo[i][poswx],winfo[i][poswy],winfo[i][poswz]))
        {
            DestroyObject(mariaobject[i]);
        }
        else
        {
            return 0;
        }
    }
    return 1;
}

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif
But when i plant more of one, when i try to pickweed only works on one that i have planted, why
Reply


Messages In This Thread
[Help] little weed system. - by Galletziz - 20.04.2014, 14:45
Re: [Help] little weed system. - by xVIP3Rx - 20.04.2014, 14:47
Respuesta: [Help] little weed system. - by Xabi - 20.04.2014, 14:47
Re: Respuesta: [Help] little weed system. - by Galletziz - 20.04.2014, 14:51
Respuesta: Re: Respuesta: [Help] little weed system. - by Xabi - 20.04.2014, 14:56
Re: [Help] little weed system. - by xVIP3Rx - 20.04.2014, 14:58
Re: Respuesta: Re: Respuesta: [Help] little weed system. - by Galletziz - 20.04.2014, 15:00
Re: [Help] little weed system. - by Galletziz - 20.04.2014, 15:03
Respuesta: Re: Respuesta: Re: Respuesta: [Help] little weed system. - by Xabi - 20.04.2014, 15:05
Re: [Help] little weed system. - by Galletziz - 20.04.2014, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)