Posts: 53
Threads: 24
Joined: Sep 2011
Reputation:
0
Is there any command that can sell all the vehlices
Posts: 1,938
Threads: 16
Joined: Feb 2007
Reputation:
0
Sure, but you'd have to create it. You just have to put the 'sold' variable to 'not sold' in every car.
Posts: 53
Threads: 24
Joined: Sep 2011
Reputation:
0
can you create it for me pls
Posts: 1,938
Threads: 16
Joined: Feb 2007
Reputation:
0
That will be impossible without any information about the way you have set up your system.
Posts: 3,351
Threads: 780
Joined: Jan 2010
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.