Bidding System ?
#1

How to make a Bidding System ?? Like A CMD for Admin like /startbid [BidID] [Car NAME] [Starting Amount] and a CMD for players Like /bid [bidid] [amount] Like this and if a player win bid ie Highest Bid Will Get a CAr Like CreateVehicle that is private car on his pos How to do it and also a /park cmd for that player to keep his car wherever he wants to
Reply
#2

This is not the place to request for scripters.

p.s your siggy doesn't make sense
Reply
#3

Im not asking for scripr Im just asking how to make IT ....
Reply
#4

just an example like this
pawn Код:
#define MAX_BIDS // max bids that can be done at one time
#define SCM SendCientMessage // helpful

enum bid
{
bool:IsOccupied,//tto heck if bidding slot is occupied or not
bidderid,
hid = -1,//highest amount bidder
carid,//the car id to bid
sa//starting amount
}

new binfo[MAX_BIDS][bid];

CMD:startbid(playerid, params[])
{
new car,amount;
if(sscanf(params,"ii",car,amount))return SCM(playerid, -1, "Wrong usage");
//then various checks of is valid car is car owned by player and that amount money is more than player in hand cash
new slot = -1;
for(new i =0; i <= MAX_BIDS; i++)
{
if(binfo[i][IsOccupied])continue;
slot = i;
break;
}
if(slot == -1)return SCM(playerid ,-1, "all slots full wait for a bid to end");
binfo[slot][occupied]= true;
binfo[slot][bidderid] = playerid;
binfo[slot][caid] = car;
binfo[slot][sa]=amount;
SetTimerEx("EndBid",1000*60*2/*2 mins*/, false, "i", slot);
SendClientMessageAll(.......)//edit it that bid at "slot" began use /bid id amount to bid
return 1;
}

CMD:bid(playerid, parmas[])
{
//sscanf check in game cash checks and other checks now
//suppose u store bid id in "bidd" and cash to bid in "amount"
if(!binfo[bidd][IsOccupied])retrun SCM(playerid, -1 , "No bid on the id u gave");
if(amount < binfo[bidd][sa])return SCM(playerid , -1 ," a highest bid is already there place more high");
binfo[bidd][sa] = amount;
binfo[bidd][hid] = playerid;
//sendclient mes to all that .... has placed a bid of ... on id ..
return 1;
}

forward EndBid(slot);
public EndBid(slot)
{
if(binfo[slot][hid] == -1)return //scm to all that no one placed bid
//now binfo[slot[hid] won the bid scm to all that he won and send him car here

//now time to reset bid enum variables
binfo[slot][IsOccupied] = false;
binfo[slot][hid] = -1;
//like this reset all amounts
return 1;
}
Notes
-- onplayer disconnect u have to check if bid discconctor id ==highest bidder of some bid and also if he is the bid starter or not
Reply
#5

But how to send A Private CAr Of his name ? And save it ?
Reply
#6

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
But how to send A Private CAr Of his name ? And save it ?
for that u need a private car system
we are not here to script whole of thing for you
make a private car system go and ****** it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)