Hallo,
wenn ich /ofpark mache also ein frakcar parken will kommt nichts und passiert nichts!
woran liegt denn das?
SQL
if(strcmp("/ofpark",cmdtext,true)==0)
{
new vehi;
new modelstring[45],xstring[45], ystring[45], zstring[45], anglestring[45];
new Float:vehx, Float:vehy, Float:vehz;
new vehmodel;
new platestring[8];
new Float:vehangle;
vehi = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vehi, vehangle);
vehmodel = GetVehicleModel(vehi);
GetVehiclePos(vehi, vehx, vehy, vehz);
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_GREY, " An deinem Abschleppwagen ist kein Auto angehängt!");
return 1;
}
if(PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24)
{
for(new i = 0; i < sizeof(PDCars); i++)
{
if(vehi == PDCars[i])
{
RemovePlayerFromVehicle(playerid);
DestroyVehicle(PDCars[i]);
PDCars[i] = CreateVehicle(vehmodel, vehx, vehy, vehz+0.5, vehangle, 79, 1, 900);
format(platestring, sizeof(platestring), "SAPD %i", i);
SetVehicleNumberPlate(PDCars[i],platestring);
fCarparkInfo[1] [i] [ModelId] = vehmodel;
fCarparkInfo[1] [i] [ParkX] = vehx;
fCarparkInfo[1] [i] [ParkY] = vehy;
fCarparkInfo[1] [i] [ParkZ] = vehz;
fCarparkInfo[1] [i] [ParkAngle] = vehangle;
format(modelstring,sizeof(modelstring), "Car%i_Model",i);
dini_IntSet("SAPDCars.ini",modelstring,fCarparkInfo[1] [i] [ModelId]);
format(xstring,sizeof(xstring), "Car%i_X",i);
dini_FloatSet("SAPDCars.ini",xstring,fCarparkInfo[1] [i] [ParkX]);
format(ystring,sizeof(ystring), "Car%i_Y",i);
dini_FloatSet("SAPDCars.ini",ystring,fCarparkInfo[1] [i] [ParkY]);
format(zstring,sizeof(zstring), "Car%i_Z",i);
dini_FloatSet("SAPDCars.ini",zstring,fCarparkInfo[1] [i] [ParkZ]);
format(anglestring,sizeof(anglestring), "Car%i_Angle",i);
dini_FloatSet("SAPDCars.ini",anglestring,fCarparkInfo[1] [i] [ParkAngle]);
}
}
}
Alles anzeigen
pwn gibts grad net sry...
Wieso geht das nicht?
Hoffe es kann einer helfen LG
Moritz