hey mein Abbschlepp sys geht nicht helft mir mal bitte
einmal hier
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
{
IsTowTrucker[playerid]=1;
TowTruckers++;
SendClientMessage(playerid,0xFFFF00AA,"Benutze die STRG taste um ein Auto abzuschleppen");
}
else
{
if(TowTruckers>0)
{
SendClientMessage(playerid,0xFFFF00AA,"Steht ein Auto falsch?Benutze /service Ordnungsamt!");
}
}
if((newstate==PLAYER_STATE_ONFOOT)&&(IsTowTrucker[playerid]==1))
{
IsTowTrucker[playerid]=0;
TowTruckers--;
}
else if((newstate==PLAYER_STATE_PASSENGER)&&(TowTruckers>0))
{
SendClientMessage(playerid,0xFFFF00AA,"Steht ein Auto falsch?Benutze /service Ordnungsamt!");
}
if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
{
if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
{
SendClientMessage(playerid,0xFFFF00AA,"Versuchen ein Auto abzuschleppen");
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
new Float:vX,Float:vY,Float:vZ;
new Found=0;
new vid=0;
while((vid<MAX_VEHICLES)&&(!Found))
{
vid++;
GetVehiclePos(vid,vX,vY,vZ);
if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
Found=1;
if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
}
AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
SendClientMessage(playerid,0xFFFF00AA,"Auto amhacken!");
}
}
if (!Found)
{
SendClientMessage(playerid,0xFFFF00AA,"Kein Auto in der Nähe des Hakcens.");
}
}
}