Car Sale
#6

Something like this:

pawn Код:
new carsold[MAX_VEHICLES];
Command:

pawn Код:
CMD:sellvehicle(playerid[])
{
    if(carsold[vehicleid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You have already sold this car.");
    SendClientMessage(playerid,orange,"***Car Sold!***");
    GivePlayerMoney(playerid,5000);
    return 1;
}
But i don't think it's correct,i just gave you an example.You have to get the vehicle id of the driver and put the variable carsold on 1 when you sold the car,and 0 when the car isn't sold.

Remember to reset the variable when a player disconnect or at least put a timer.
Reply


Messages In This Thread
Car Sale - by Starky Yakavetta - 28.09.2012, 20:31
Re: Car Sale - by Beljulji - 28.09.2012, 20:32
Re: Car Sale - by mamorunl - 28.09.2012, 20:39
Re: Car Sale - by Starky Yakavetta - 28.09.2012, 20:41
Re: Car Sale - by mamorunl - 28.09.2012, 20:47
Re: Car Sale - by Face9000 - 28.09.2012, 20:51

Forum Jump:


Users browsing this thread: 2 Guest(s)