Jump to content
  • 0

Problema la masini


Question

Posted

Salut...

Am o problema pe care nu o pot rezolva..Nici cei de pe .com nu au o rezolvare pentru asta.De doua saptamani s-au chiar mai mult astept un raspuns de la ei dar nimeni nu stie.Sper ca voi puteti sa ma ajutati :

Pe server,cand ma urc intr-o masina (dau /engine ,merg cu ea) dupa ce cobor la fix 2 minute masina se respawneaza automat.Ce pot face ?

Am incercat sa pun la sfarsit la AddStaticVehicleEx : 999999 sau -1 ..tot asa face

La fix 2 minute se respawneaza..

10 answers to this question

Recommended Posts

Posted

aratane comanda...de la engine si comanda de respawnat masinile...+ stockul

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

[pawn]//================================ Engine ==========================================================

if(strcmp(cmd, "/engine", true) == 0 || strcmp(cmd, "/engine", true) == 0)

{

        new vid = GetPlayerVehicleID(playerid);

        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);

if(vid != INVALID_VEHICLE_ID)

if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, "Trebuie sa te afli intr-un vehicul pentru a face asta.");

if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_GRAD2, "Numai soferul poate face asta.");

if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)

{

            SendClientMessage(playerid, -1, ""#COL_WHITE"> Tocmai "#COL_GREEN" ai pornit"#COL_WHITE" motorul masinii");

            GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "* %s scoate o pereche de key din buzunar - baga cheile in contact si rasuceste acesta pornind motorul.", sendername);

ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

            SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);

        }

        else if(engine == VEHICLE_PARAMS_ON)

{

            SendClientMessage(playerid, -1, ""#COL_WHITE"> Tocmai "#COL_RED"ai oprit"#COL_WHITE" motorul masinii.");

            GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "* %s intinde mana catre contact dupa care rasuceste de chei ,oprind motorul.", sendername);

ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

            SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);

        }

return 1;

    }[/pawn]

[pawn]  if(strcmp(cmd, "/vehdespawn", true) == 0 || strcmp(cmd, "/rav", true) == 0) // by Mikkel Reimer

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pAdmin] < 3)

{

    SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

    return 1;

}

new bool:unwanted[CAR_AMOUNT];

for(new player=0; player<MAX_PLAYERS; player++)

    {

            if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }

    }

for(new car = 1; car <= 268; car++)

{

if(!unwanted[car]) SetVehicleToRespawn(car);

}

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "SERVER: "COL_WHITE"All unused vehicles were respawned by Administrator %s.", sendername);

SendClientMessageToAll(COLOR_GREEN,string);

}

return 1;

}[/pawn]

Daca te refereai la SetVehicleToRespawn ala este doar la /unrentcar [ Sa dispara cand dai comanda ] si la /rav,/rtc...

Posted

hmm...publicul OnPlayerExitVehicle nu ai?

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

[pawn]public OnPlayerExitVehicle(playerid, vehicleid)

{

if(PlayerSeatbelt[playerid] == 1)

{

        new string[128];

    new sendername[24];

PlayerSeatbelt[playerid] = 0;

GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, sizeof(string), " %s isi da centura de siguranta la o parte,deschide usa dupa care iese din masina.", sendername);

ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

}

    if(vehicleid >= PizzaBike[0] && vehicleid <= PizzaBike[4])

    {

if(PlayerInfo[playerid][pPRoute] == 1)

{

    SendClientMessage(playerid, COLOR_WHITE,"Pizza-Bike Radio : Dute cu pizza la usa casei.");

    SetPlayerAttachedObject( playerid, 0, 1582, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );

ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);

}

}

StopAudioStreamForPlayer(playerid);

return 1;

}[/pawn]

Posted

incearca sa pui

public OnPlayerExitVehicle(playerid, vehicleid)
{
	/*if(PlayerSeatbelt[playerid] == 1)
	{
	        new string[128];
	    	new sendername[24];
			PlayerSeatbelt[playerid] = 0;
			GetPlayerName(playerid, sendername, sizeof(sendername));
  		  	format(string, sizeof(string), " %s isi da centura de siguranta la o parte,deschide usa dupa care iese din masina.", sendername);
	 		ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
 	}
    if(vehicleid >= PizzaBike[0] && vehicleid <= PizzaBike[4])
    {
		if(PlayerInfo[playerid][pPRoute] == 1)
		{
		    SendClientMessage(playerid, COLOR_WHITE,"Pizza-Bike Radio : Dute cu pizza la usa casei.");
    		SetPlayerAttachedObject( playerid, 0, 1582, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
	 		ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
	 	}
	 }
	 StopAudioStreamForPlayer(playerid);*/
	 return 1;
}

si vezi daca mai da respawn...astept raspuns

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

Oare are legatura cu :

[pawn]stock ReloadCar(i)

{

new carstring[256];

new FileName[128];

format(FileName, sizeof(FileName), "Cars/car_%d.ini", i);

  if(fexist(FileName))

{

if(i == 1)

{

format(carstring,sizeof(carstring),"%s For Sale | {FFF1AF}Price: $%d | {6EF83C}ID: %d",vehName[CarInfo[CarModel]-400],CarInfo[CarPrice],i);

CarInfo[CarText] = Create3DTextLabel(carstring, COLOR_CAR, 0.0, 0.0, 0.0, 15.0, 0);

CarInfo[CarID] = AddStaticVehicleEx(CarInfo[CarModel],CarInfo[CarX],CarInfo[CarY],CarInfo[CarZ],CarInfo[CarF],CarInfo[CarColor],CarInfo[CarColor2],1);

Attach3DTextLabelToVehicle(CarInfo[CarText], CarInfo[CarID], 0.0, 0.0, 0.0);

//     SetVehicleVirtualWorld(i,255);

CarInfo[DealerShipCar] = 1;

}

else

{

format(carstring,sizeof(carstring),"%s For Sale | {FFF1AF}Price: $%d | {6EF83C}ID: %d",vehName[CarInfo[CarModel]-400],CarInfo[CarPrice],i);

CarInfo[CarText] = Create3DTextLabel(carstring, COLOR_CAR, 0.0, 0.0, 0.0, 15.0, 0);

CarInfo[CarID] = AddStaticVehicleEx(CarInfo[CarModel],CarInfo[CarX],CarInfo[CarY],CarInfo[CarZ],CarInfo[CarF],CarInfo[CarColor],CarInfo[CarColor2],1);

Attach3DTextLabelToVehicle(CarInfo[CarText], CarInfo[CarID], 0.0, 0.0, 0.0);

CarInfo[DealerShipCar] = 1;

}

}

return 1;

}

stock ReloadCarEx(i)

{

new carstring[256];

new FileName[128];

format(FileName, sizeof(FileName), "Cars/car_%d.ini", i);

  if(fexist(FileName))

{

Delete3DTextLabel(CarInfo[CarText]);

if(i == 1)

{

format(carstring,sizeof(carstring),"%s For Sale | {FFF1AF}Price: $%d | {6EF83C}ID: %d",vehName[CarInfo[CarModel]-400],CarInfo[CarPrice],i);

CarInfo[CarText] = Create3DTextLabel(carstring, COLOR_CAR, 0.0, 0.0, 0.0, 15.0, 0);

CarInfo[CarID] = AddStaticVehicleEx(CarInfo[CarModel],CarInfo[CarX],CarInfo[CarY],CarInfo[CarZ],CarInfo[CarF],CarInfo[CarColor],CarInfo[CarColor2],1);

Attach3DTextLabelToVehicle(CarInfo[CarText], CarInfo[CarID], 0.0, 0.0, 0.0);

//     SetVehicleVirtualWorld(i,255);

CarInfo[DealerShipCar] = 1;

}

else

{

format(carstring,sizeof(carstring),"%s For Sale | {FFF1AF}Price: $%d | {6EF83C}ID: %d",vehName[CarInfo[CarModel]-400],CarInfo[CarPrice],i);

CarInfo[CarText] = Create3DTextLabel(carstring, COLOR_CAR, 0.0, 0.0, 0.0, 15.0, 0);

CarInfo[CarID] = AddStaticVehicleEx(CarInfo[CarModel],CarInfo[CarX],CarInfo[CarY],CarInfo[CarZ],CarInfo[CarF],CarInfo[CarColor],CarInfo[CarColor2],1); // Blade ID 56

Attach3DTextLabelToVehicle(CarInfo[CarText], CarInfo[CarID], 0.0, 0.0, 0.0);

CarInfo[DealerShipCar] = 1;

}

}

return 1;

}[/pawn]

Nu cred dar..

Posted

Verifica timerele, publicurile, stock-urile

Timerele la ce ? Am verificat tot ce era legat de SetVehicleToRespawn si ResetVehicle...Nimic..

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.