Hayho ich raffe es nicht ich habe ein befehl
Hier
if(!strcmp(cmdtext, "/abschleppen", true))
{
if(PlayerInfo[playerid][pArbeiter]== 24 || PlayerInfo[playerid][pChef]==24)
{
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
new Float:vX, Float:vY, Float:vZ;
new Found = 0;
new vdid = 0;
while((vdid<MAX_VEHICLES)&&(!Found))
{
vdid++;
GetVehiclePos(vdid,vX,vY,vZ);
if((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vdid!=GetPlayerVehicleID(playerid)))
{
Found=1;
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
}
AttachTrailerToVehicle(vdid,GetPlayerVehicleID(playerid));
SetPVarInt(playerid, "Towing", 1),
SetPVarInt(playerid, "TowingCar", vdid);
SendClientMessage(playerid,YELLOW,"* Du hast das Fahrzeug am Hacken!");
return 1;
}
}
}
return 1;
}
Wie mache ich es das das Auto Abschleppt wird wenn ich STRG drücke?