Hey,
ich habe ein Problem mit den Race Pickups.
Wenn ich den ersten berühre bekomme ich ohne Probleme Nitro,
doch wenn ich bei nächsten ankomme, passiert nix. Weder Rep
noch Nitro.
Wie fixxe ich das?
Hier der Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i=0; i<sizeof(NosInfo); i++)
{
if(pickupid == NosInfo[i][PickupID])
{
new veh = GetPlayerVehicleID(playerid);
AddVehicleComponent(veh, 1010);
return 1;
}
}
for(new i=0; i<sizeof(RepInfo); i++)
{
if(pickupid == RepInfo[i][PickupID])
{
new veh = GetPlayerVehicleID(playerid);
RepairVehicle(veh);
SetVehicleHealth(veh,1000.00);
return 1;
}
}
for(new i=0; i<sizeof(CCInfo); i++)
{
if(pickupid == CCInfo[i][PickupID])
{
new Float:warx, Float:wary, Float:warz;
new Float:X, Float:Y, Float:Z, Float:A;
new veh = GetPlayerVehicleID(playerid);
GetVehiclePos(veh,X,Y,Z);
GetVehicleZAngle(veh,A);
GetVehicleVelocity(veh, warx, wary, warz);
DestroyVehicle(veh);
new car = CreateVehicle(CCInfo[i][modelid],X,Y,Z,A,-1,-1,-1);
SetVehicleParamsEx(car,VEHICLE_PARAMS_ON,0,0,0,0,0,0);
SetVehiclePos(car,X,Y,Z);
SetVehicleZAngle(car,A);
PutPlayerInVehicle(playerid,car,0);
SetVehicleVelocity(car,warx,wary,warz);
return 1;
}
}
return 1;
}
{
for(new i=0; i<sizeof(NosInfo); i++)
{
if(pickupid == NosInfo[i][PickupID])
{
new veh = GetPlayerVehicleID(playerid);
AddVehicleComponent(veh, 1010);
return 1;
}
}
for(new i=0; i<sizeof(RepInfo); i++)
{
if(pickupid == RepInfo[i][PickupID])
{
new veh = GetPlayerVehicleID(playerid);
RepairVehicle(veh);
SetVehicleHealth(veh,1000.00);
return 1;
}
}
for(new i=0; i<sizeof(CCInfo); i++)
{
if(pickupid == CCInfo[i][PickupID])
{
new Float:warx, Float:wary, Float:warz;
new Float:X, Float:Y, Float:Z, Float:A;
new veh = GetPlayerVehicleID(playerid);
GetVehiclePos(veh,X,Y,Z);
GetVehicleZAngle(veh,A);
GetVehicleVelocity(veh, warx, wary, warz);
DestroyVehicle(veh);
new car = CreateVehicle(CCInfo[i][modelid],X,Y,Z,A,-1,-1,-1);
SetVehicleParamsEx(car,VEHICLE_PARAMS_ON,0,0,0,0,0,0);
SetVehiclePos(car,X,Y,Z);
SetVehicleZAngle(car,A);
PutPlayerInVehicle(playerid,car,0);
SetVehicleVelocity(car,warx,wary,warz);
return 1;
}
}
return 1;
}