Pickups dont work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pickups dont work (
/showthread.php?tid=431797)
Pickups dont work -
Narushi - 19.04.2013
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;
}
Re: Pickups dont work -
DobbysGamertag - 19.04.2013
Are they the correct pickup types?
Re: Pickups dont work -
Narushi - 19.04.2013
Yes, they have Pickup Type 14 (for vehicles).
Код:
Nitro[i] = CreatePickup(1239,14,xml_get_float(Map, Str[2]),xml_get_float(Map, Str[3]),xml_get_float(Map, Str[4]));
Re: Pickups dont work -
newbienoob - 20.04.2013
Pickup ID 14 is bugged on a custom objects.
Re: Pickups dont work -
Narushi - 20.04.2013
Quote:
Originally Posted by newbienoob
Pickup ID 14 is bugged on a custom objects.
|
And what i have to do now? :S