(HELP) COLOR SAVE PROBLEM
#1

Hey, if i change color of my owned car and respawn it or reset server or something like that, it doesn't save and there is color what there was before again, please could you help me how to do that will save the colors of ownable vehicles?
Maybe can help this command of color... but i need for Pay'n'Spray too, is it possible?

So please help...THX

pawn Код:
else if(strcmp(x_nr,"color",true) == 0)
            {
                if(PlayerInfo[playerid][pPcarkey] == 999 && PlayerInfo[playerid][pPcarkey2] == 999 && PlayerInfo[playerid][pPcarkey3] == 999)
                {
                    SendClientMessage(playerid, COLOR_GREY,"   You don't have a vehicle to respray.");
                    return 1;
                }
                if(GetPlayerMoney(playerid) < 1000)
                {
                    SendClientMessage(playerid, COLOR_GREY,"   You don't have enough money for vehicle respray.");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");
                    return 1;
                }
                new color1;
                color1 = strval(tmp);
                if(color1 < 0 && color1 > 126)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Wrong color id!");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");
                    return 1;
                }
                new color2;
                color2 = strval(tmp);
                if(color2 < 0 && color2 > 126)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Wrong color id!");
                    return 1;
                }

                new vehid;
                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }
                else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }
                else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { vehid = PlayerInfo[playerid][pPcarkey3]; }
                else { return 1; }

                if(IsPlayerInVehicle(playerid, vehid))
                {
                    CarInfo[vehid][cColorOne] = color1;
                    CarInfo[vehid][cColorTwo] = color2;
                    SafeGivePlayerMoney(playerid, -1000);
                    GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$1000", 5000, 1);
                    ChangeVehicleColor(vehid, color1, color2);
                    OnPropUpdate();
                    OnPlayerUpdate(playerid);
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY,"   You are not in your vehicle.");
                    return 1;
                }
Reply


Messages In This Thread
(HELP) COLOR SAVE PROBLEM - by spaty2 - 27.07.2011, 19:27
Re: (HELP) COLOR SAVE PROBLEM - by spaty2 - 27.07.2011, 20:48
Re: (HELP) COLOR SAVE PROBLEM - by Vince - 27.07.2011, 21:35
Re: (HELP) COLOR SAVE PROBLEM - by spaty2 - 28.07.2011, 08:37

Forum Jump:


Users browsing this thread: 1 Guest(s)