truck job
#1

hello, i have been working on my truck job and i've got a weird error. when i do /buyprod in truck 1, it sais i have to be in a truck. when i am in truck 2, it sais i bought a trailer and it adds a trailer to truck 1.... i want to have it like, truck 1: trailer 1, truck 2: trailer to, etc. this is my script:

Код:
	if(!strcmp("/buyprod", cmdtext, true,9))
	for(new i; i<sizeof(truck); i++)
 	{
 	if(GetPlayerMoney(playerid)<=499)
 		return SendClientMessage(playerid,COLOR_RED,"You don't have $500");
  if(!PlayerToPoint(30.0,playerid,-1834.4691, 129.1151, 15.1171))
    return SendClientMessage(playerid, COLOR_RED, "You have to be at the truck loadstation");
  if(!IsPlayerInVehicle(playerid, truck[1]))
    return SendClientMessage(playerid, COLOR_RED, "You have to be in a truck!");
  GivePlayerMoney(playerid,-500);
  SendClientMessage(playerid, COLOR_GREEN, "You have bought products for $500.");
  CP1truckerjob = CreateCheckpoint(-1866.2645, 1409.7406, 7.7822, 10.0, 9999.9, "CP1truckerjob",true);
  return AttachTrailerToVehicle(trailer[i],truck[i]);
 	}
further i have this:
Код:
new truck[5];
new trailer[5];
and the trucks identified of course

could anyone help me with it??..
Reply


Messages In This Thread
truck job - by thuron - 16.03.2009, 20:37
Re: truck job - by Jack_Fox - 16.03.2009, 21:09
Re: truck job - by thuron - 17.03.2009, 08:18
Re: truck job - by Jack_Fox - 17.03.2009, 15:55
Re: truck job - by thuron - 17.03.2009, 16:33
Re: truck job - by Jack_Fox - 18.03.2009, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)