also ich habe es jetzt so einigermaßen gemacht, aber es passiert überall nix...
//GamemodeInit
nos[0] = Nitro(1549.0024,-2258.1736,13.5469);
rep[0] = Repair(1543.9928,-2246.1135,13.5469);
vehc[0] = VehChange(1536.2899,-2223.8933,13.5469);
//stocks
stock Nitro(Float:X, Float:Y, Float:Z)
{
CreatePickup(1252,14,X,Y,Z);
return 1;
}
stock Repair(Float:X, Float:Y, Float:Z)
{
CreatePickup(1240,14,X,Y,Z);
return 1;
}
stock VehChange(Float:X, Float:Y, Float:Z)
{
CreatePickup(1247,14,X,Y,Z);
/*new veh = GetPlayerVehicleID(playerid);
new Float:px,Float:py,Float:pz;
new Float:vx,Float:vy,Float:vz,Float:va;
GetPlayerPos(playerid,px,py,pz);
GetVehicleVelocity(veh, vx,vy,vz);
GetVehicleZAngle(veh,va);
DestroyVehicle(veh);
new carid = CreateVehicle(veh, px, py, pz, pa, -1, -1, 60000);
PutPlayerInVehicle(playerid, carid, 0);
SetVehicleVelocity(carid, vx,vy,vz);*/
return 1;
}
stock Nitro(Float:X, Float:Y, Float:Z)
{
CreatePickup(1252,14,X,Y,Z);
return 1;
}
stock Repair(Float:X, Float:Y, Float:Z)
{
CreatePickup(1240,14,X,Y,Z);
return 1;
}
stock VehChange(Float:X, Float:Y, Float:Z)
{
CreatePickup(1247,14,X,Y,Z);
/*new veh = GetPlayerVehicleID(playerid);
new Float:px,Float:py,Float:pz;
new Float:vx,Float:vy,Float:vz,Float:va;
GetPlayerPos(playerid,px,py,pz);
GetVehicleVelocity(veh, vx,vy,vz);
GetVehicleZAngle(veh,va);
DestroyVehicle(veh);
new carid = CreateVehicle(veh, px, py, pz, pa, -1, -1, 60000);
PutPlayerInVehicle(playerid, carid, 0);
SetVehicleVelocity(carid, vx,vy,vz);*/
return 1;
}
//PlayerPickupPickup
for(new n=0; n<sizeof(nos); n++) { if(pickupid==nos[n]) {AddVehicleComponent(GetPlayerVehicleID(playerid),1024); return 1; } }
for(new r=0; r<sizeof(rep); r++) { if(pickupid==rep[r]) {RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid),1000); return 1; }}
for(new i=0; i<sizeof(vehc); i++)
{
if(pickupid == vehc[i])
{
if(vehc[i] == vehc[0])
{
new veh = GetPlayerVehicleID(playerid);
new Float:vx,Float:vy,Float:vz,Float:va;
GetVehicleVelocity(veh, vx,vy,vz);
GetVehicleZAngle(veh,va);
DestroyVehicle(veh);
new carid = CreateVehicle(veh, vx, vy, vz, va, -1, -1, 60000);
PutPlayerInVehicle(playerid, carid, 0);
SetVehicleVelocity(carid, vx,vy,vz);
}
return 1;
}
}
for(new n=0; n<sizeof(nos); n++) { if(pickupid==nos[n]) {AddVehicleComponent(GetPlayerVehicleID(playerid),1024); return 1; } }
for(new r=0; r<sizeof(rep); r++) { if(pickupid==rep[r]) {RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid),1000); return 1; }}
for(new i=0; i<sizeof(vehc); i++)
{
if(pickupid == vehc[i])
{
if(vehc[i] == vehc[0])
{
new veh = GetPlayerVehicleID(playerid);
new Float:vx,Float:vy,Float:vz,Float:va;
GetVehicleVelocity(veh, vx,vy,vz);
GetVehicleZAngle(veh,va);
DestroyVehicle(veh);
new carid = CreateVehicle(veh, vx, vy, vz, va, -1, -1, 60000);
PutPlayerInVehicle(playerid, carid, 0);
SetVehicleVelocity(carid, vx,vy,vz);
}
return 1;
}
}
//edit: Die Pickups werden erstellt, aber bewirken nichts