Pizza Issue
#1

Hello everyone, i am working on a new Pizza Boy system . those are raw codes i just created him to see if they work and i saw that when i write /work is spawning the vehicle but is not attaching any object to the car , where can the problem be
pawn Код:
CMD:getcommand(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pJob] == 5)
        {
            if(IsPlayerInRangeOfPoint(playerid, 5.0, 379.1806,-119.4146,1001.4922))
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit 5 pizza. Urca-te pe scuter si livreaza-le.");
                pizzab[playerid] = CreateObject(1582, 0, 0, 0, 0, 0, 96.0);
                pizzab1[playerid] = CreateObject(1582, 0.0, 0.0, 0.0, 0.0, 0.0, 96.0);
                pizzab2[playerid] = CreateObject(1582, 0.0, 0.0, 0.0, 0.0, 0.0, 96.0);
                pizzab3[playerid] = CreateObject(1582, 0.0, 0.0, 0.0, 0.0, 0.0, 96.0);
                pizzab4[playerid] = CreateObject(1582, 0.0, 0.0, 0.0, 0.0, 0.0, 96.0);
                AttachObjectToPlayer(pizzab[playerid], playerid, -0.104613, 0.440760, 0.350000, 0.000000, 0.000000, 0.000000);
                AttachObjectToPlayer(pizzab1[playerid], playerid, -0.104613, 0.440760, 0.420000, 0.000000, 0.000000, 0.000000);
                AttachObjectToPlayer(pizzab2[playerid], playerid, -0.104613, 0.440760, 0.490000, 0.000000, 0.000000, 0.000000);
                AttachObjectToPlayer(pizzab3[playerid], playerid, -0.124613, 0.440760, 0.560000, 0.000000, 0.000000, 0.000000);
                AttachObjectToPlayer(pizzab4[playerid], playerid, -0.144613, 0.440760, 0.630000, 0.000000, 0.000000, 0.000000);
                ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 1, 1, 1, 1, 1);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not at The Well Stacked Pizza.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "You are not a Pizza Boy.");
        }
    }
    return 1;
}
CMD:work(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pJob] == 5)
        {
            //if(HasPizza[playerid] == 1)
            //{
                new Float:X, Float:Y, Float:Z;
                new PizzaCar[MAX_PLAYERS];
                GetPlayerPos(playerid, X,Y,Z);
                PizzaCar[playerid] = AddStaticVehicle(448,X+2,Y+2,Z,-1,-1);
                AttachObjectToVehicle(pizzab[playerid], PizzaCar[playerid], 0.000000, -0.899999, 0.600000, 0.000000, 0.000000, 0.000000 );
                AttachObjectToVehicle(pizzab1[playerid], PizzaCar[playerid], -0.104613, -0.650760, 0.400000, 0.000000, 0.000000, 0.000000);
                AttachObjectToVehicle(pizzab2[playerid], PizzaCar[playerid], -0.104613, -0.650760, 0.450000, 0.000000, 0.000000, 0.000000);
                AttachObjectToVehicle(pizzab3[playerid], PizzaCar[playerid], -0.104613, -0.650760, 0.500000, 0.000000, 0.000000, 0.000000);
                AttachObjectToVehicle(pizzab4[playerid], PizzaCar[playerid], -0.104613, -0.650760, 0.550000, 0.000000, 0.000000, 0.000000);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)