Jump to content
  • 0

pomoc Odtahovat vozidla


FrOsTy14

Dotaz

11 odpovědí na tuto otázku

Recommended Posts

  • 0

dcmd_odtahnout(playerid, params[])
{
	#pragma unused params
    if(IsPlayerConnected(playerid))
	{
	    new IDAUTA = GetPlayerVehicleID(playerid);
    	if(zamestnani[playerid] != 3) SendClientMessage(playerid, COLOR_ORANGE, "Nejsi automechanik.");
    	else if(GetVehicleModel(IDAUTA) != 525) SendClientMessage(playerid, COLOR_ORANGE, "Musite mit odtahove vozidlo.");
		else if(IsTrailerAttachedToVehicle(IDAUTA))
		{
			DetachTrailerFromVehicle(IDAUTA);
			SendClientMessage(playerid, COLOR_ORANGE, "[Odtah] Odhaknul jsi vozidlo.");
		}else{
		    new Float:X,Float:Y,Float:Z,trailer;
			GetVehiclePos(IDAUTA,X,Y,Z);
			GetNearestVehicle(playerid, X, Y, Z, 100.0, trailer);
			AttachTrailerToVehicle(trailer, IDAUTA);
			SendClientMessage(playerid, COLOR_ORANGE, "[Odtah] Zahaknul jsi vozidlo.");
		}
	}
	return 1;
}

Tohle jsem kdysi mel na serveru :d

si to uprav a bude ti to fungovat ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...