Why does this not save the car color
#1

Hey so i am trying to color my car in game and when i do it the color of my car changes but when i log out and log back in it changes back to the color it was..

pawn Код:
command(ocarcolour, playerid, params[])
{
    new col1, col2, vehslot;
    if(sscanf(params, "ddd", col1, col2, vehslot))
    {
        SendClientMessage(playerid, WHITE, "SYNTAX: /ocarcolor [colour1] [colour2] [1-5]");
    }
    else
    {
        switch(vehslot)
        {
            case 1:
            {
                if(col1 >= 0 && col1 < 300 || col2 >= 0 && col2 < 300)
                {
                    if(Player[playerid][PlayerCarModel] > 0)
                    {
                        if(Player[playerid][HasSprayCans] >= 1 || Player[playerid][VipRank] >= 2)
                        {
                            ChangeVehicleColor(Player[playerid][CarLinkID], col1, col2);
                            Player[playerid][CarCol1] = col1;
                            Player[playerid][CarCol2] = col2;
                            if(Player[playerid][VipRank] < 2)
                            {
                                Player[playerid][HasSprayCans]--;
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "You have no spraycans left.");
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, WHITE, "Invalid colour, colours are from 0-300.");
                }
            }
        }
    }
}
If you need any more code just ask

Thanks
Reply


Messages In This Thread
Why does this not save the car color - by Euan Hughes - 02.07.2012, 18:34
Re: Why does this not save the car color - by Universal - 02.07.2012, 18:44
Re: Why does this not save the car color - by Euan Hughes - 02.07.2012, 18:46
Re: Why does this not save the car color - by Universal - 02.07.2012, 18:49

Forum Jump:


Users browsing this thread: 2 Guest(s)