Jump to content
  • 0

Sequester sistem


Gawitkkk

Question

Problema intalnita (descriere):  Am făcut un sistem de sechestrare a maşinilor, membrii TTC pot sechestra maşinile persoane.
Ero(area / rile) / warning-(ul / urile):  Totul este ok, însă doar maşina mea personala o pot sechestra, dacă am maşina altui player nu se sechestrează atunci când întru in checkpoint.
Liniile de cod / sursa / script-ul(obligatoriu):





Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da, dar tot nu reuşesc să fac să se poată sechestra şi alte maşini personale înafară de a mea.. 

if(response)

	        {

	            new idd = 2,

	            towedcar;

	            towedcar = GetVehicleTrailer(GetPlayerVehicleID(playerid));

	            CarInfo[idd][cSequester] = 1;

	            format(CarInfo[idd][cSequesterName],256,GetName(playerid));

	            format(CarInfo[idd][cSequesterReason], 256, inputtext);

	            CarInfo[idd][cSequesterPrice] = 5;

	            CarInfo[idd][cSequesterTime] = 12;

	            vUpdate(idd,  cSequesterx);

	            vUpdate(idd,  cSequesterNamex);

	            vUpdate(idd,  cSequesterReasonx);

	            vUpdate(idd,  cSequesterPricex);

	            vUpdate(idd,  cSequesterTimex);

	            SCM(playerid, COLOR_WHITE, "You sequester with successfull that personal vehicle !");

	            SetVehicleToRespawn(towedcar);

	            DisablePlayerCheckpoint(playerid);

	        }
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
On 22.12.2015 at 08:59, Adrian_Petre said:

Arata comanda /engine.

Uite

 

CMD:engine(playerid,params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new idcar = GetPlayerVehicleID(playerid),string[128],sendername[25];
        new engine,lights,alarm,doors,bonnet,boot,objective;
        if(Gas[idcar] == 0) return SCM(playerid,COLOR_WHITE,"{FFB870}This car don't have fuel.");
        if(IsABike(idcar)) return SendClientMessage(playerid,COLOR_WHITE,"{999999}Command can not be used on bike.");
        if(idcar == hotc[1] || idcar == hotc[2]) return SCM(playerid,COLOR_WHITE,"{FFB870}Invalid command on this car.");
        if(idcar == sanr[1] || idcar == sanr[2]) return SCM(playerid,COLOR_WHITE,"{FFB870}Invalid command on this car.");
        if(Refueling[playerid] == 0)
           {
             if(vehEngine[idcar] == 0)
            {
                vehEngine[idcar] = 1;
                GetVehicleParamsEx(idcar,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(idcar,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                new vehicle;
                vehicle = GetVehicleModel(idcar) - 400;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SetPVarInt(playerid, "Engine", 1);
                if(GoChase[playerid] != 999)
                {
                    SCM(playerid,COLOR_WHITE,"Engine started, message not show for any players because you are undercover.");
                }
                else
                {
                    format(string,sizeof(string),"%s starts the engine of the %s.",sendername,aVehicleNames[vehicle]);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
            }
                else if(vehEngine[idcar] == 1)
            {
                vehEngine[idcar] = 0;
                GetVehicleParamsEx(idcar,engine,lights,alarm,doors,bonnet,boot,objective);
                  SetVehicleParamsEx(idcar,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                new vehicle;
                vehicle = GetVehicleModel(idcar) - 400;
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SetPVarInt(playerid, "Engine", 0);
                if(GoChase[playerid] != 999)
                {
                    SCM(playerid,COLOR_WHITE,"Engine stoped, message not show for any players because you are undercover.");
                }
                else
                {
                    format(string,sizeof(string),"%s stops the engine of the %s.",sendername,aVehicleNames[vehicle]);
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
            }
        }
        else return SendClientMessage(playerid,COLOR_WHITE,"{999999}Please wait, you refill your vehicle.");
    }
    else return SendClientMessage(playerid,COLOR_WHITE,"{999999}You need to be in a vehicle to use this command.");
    return 1;
}

Link to comment
Share on other sites

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.