Adding Checker (If ForSale)
#2

I havent compiled to test it but uhhm, this?
pawn Код:
new ForSale[MAX_VEHICLES];
else if(strcmp(x_nr,"forsale",true) == 0)
            {
                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])
                {
                    if(ForSale[idcar] == true) return SendClientMessage(playerid, COLOR_GREY, "This car is already for sale!");
                    new Float:x,Float:y,Float:z; GetVehiclePos(idcar, x,y,z);
                    new model[24]; GetVehicleName(idcar,model,sizeof(model));
                    new PropertyString[256];
                    format(PropertyString,sizeof(PropertyString),"Vehicle For Sale! \n Model: %s (%d) \n Call %s for purchasing it. \n Phone Number: %d",model,GetVehicleModel(idcar),sendername,PlayerInfo[giveplayerid][pPnumber]);
                    VehicleLabel[idcar] = Create3DTextLabel(PropertyString, 0xFF0000CC, x, y, z, 10, 0, 1);
                    Attach3DTextLabelToVehicle(VehicleLabel[idcar],idcar,0,0,0);
                    ForSale[idcar] = true;
                    return 1;
                }
                SendClientMessage(playerid, COLOR_GREY, "You have to be in your own car to sell it!");
                return 1;

            }
            else if (strcmp(x_nr,"notforsale",true) == 0)
            {
                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2])
                {
                if(ForSale[idcar] == false) return SendClientMessage(playerid, COLOR_GREY, "This car is not for sale!");
                Delete3DTextLabel( VehicleLabel[idcar] );
                ForSale[idcar] = false;
                }
                SendClientMessage(playerid, COLOR_GREY, "You have to be in your own car to make it not for sale!");
                 return 1;
            }
Reply


Messages In This Thread
Adding Checker (If ForSale) - by jakejohnsonusa - 16.12.2012, 11:47
Re: Adding Checker (If ForSale) - by Mike_Peterson - 16.12.2012, 11:59
Re: Adding Checker (If ForSale) - by [DOG]irinel1996 - 16.12.2012, 12:41

Forum Jump:


Users browsing this thread: 2 Guest(s)