Pickups dont work
#1

Hey people,
I'm trying to convert MTA Race Maps.
But now the pickups and really be created, but
when I go into the pickups, nothing happens. Why?

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	new VID = GetPlayerVehicleID(playerid);
	new Float:V_X,Float:V_Y,Float:V_Z,Float:P_X,Float:P_Y,Float:P_Z,Float:P_A;
	for(new i=0; i<MAX_PICKUPS; i++)
	{
	    if(pickupid == Nitro[i]) {
			AddVehicleComponent(VID,1010);
		}
 	}
	for(new i=0; i<MAX_PICKUPS; i++)
	{
	    if(pickupid == Repair[i]) {
			SetVehicleHealth(VID,100.0);
			RepairVehicle(VID);
		}
 	}
	for(new i=0; i<MAX_PICKUPS; i++)
	{
	    if(pickupid == VChange[i]) {
			GetVehicleVelocity(VID,V_X,V_Y,V_Z);
			GetVehiclePos(VID,P_X,P_Y,P_Z);
			GetVehicleZAngle(VID,P_A);
			DestroyVehicle(VID);
			new createdCar = CreateVehicle(ChangeID[i],P_X,P_Y,P_Z,P_A,-1,-1,-1);
			SetVehiclePos(createdCar,P_X,P_Y,P_A);
			SetVehicleZAngle(createdCar,P_A);
			PutPlayerInVehicle(playerid,createdCar,0);
			SetVehicleVelocity(createdCar,V_X,V_Y,V_Z);
		}
 	}
	return 1;
}
Reply


Messages In This Thread
Pickups dont work - by Narushi - 19.04.2013, 23:23
Re: Pickups dont work - by DobbysGamertag - 19.04.2013, 23:30
Re: Pickups dont work - by Narushi - 19.04.2013, 23:37
Re: Pickups dont work - by newbienoob - 20.04.2013, 00:18
Re: Pickups dont work - by Narushi - 20.04.2013, 00:25

Forum Jump:


Users browsing this thread: 2 Guest(s)