Moveing Object
#1

pawn Код:
dcmd_plant( playerid, params[])
{
    #pragma unused params
    if(WeedSeeds[playerid] >= 1)
    {
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, a);
        WeedX[playerid] = x;
        WeedY[playerid] = y;
        WeedZ[playerid] = z;
        WeedA[playerid] = a;
        WeedSeeds[playerid] -= 1;
        SendClientMessage(playerid, 0xFFFFFFF, "You have planted a seed. Use /water to grow it!");
        WeedPlant = CreateObject(3409, WeedX[playerid], WeedY[playerid], WeedZ[playerid]-4.0, WeedA[playerid], WeedA[playerid], WeedA[playerid], 15.0);
        return 1;
    }
    else return SendClientMessage(playerid, 0xFFFFFFF, "You don't have any weed left.");
}

dcmd_water( playerid, params[])
{
    #pragma unused params
    if(IsPlayerInRangeOfPoint(playerid, 5.0, WeedX[playerid], WeedY[playerid], WeedZ[playerid]))
    {
        MoveObject(WeedPlant, WeedX[playerid], WeedY[playerid], WeedZ[playerid]+0.1, 1.0, 0.0, 0.0, 0.0);
    }
    else return SendClientMessage(playerid, 0xFFFFFFF, "You must be near to where you planted the weed.");
But after i use /water , the object is created higher than i want , coz i want it on the ground after /water

PIC:
Reply


Messages In This Thread
Moveing Object - by nor15 - 16.08.2013, 23:06
Re: Moveing Object - by Edix - 16.08.2013, 23:31

Forum Jump:


Users browsing this thread: 1 Guest(s)