Help here a bit
#1

Hey i have make a hotwire now i want so when ppl have hotwire the car one time and if ppl type /hotwire again i want so i say this car i already hotwired

cmd
Код:
}
CMD:hotwire(playerid, params[])
{
     new
        string[128],
        giveplayerid,
        vehicleid = GetPlayerVehicleID(playerid);
        
	if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 0)
    {
		format(string, sizeof(string), "* %s Grabs his/her toolkit and begins to unzip it", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		SetTimerEx("Hotwire",1000, 0 , "dd", vehicleid, playerid);
		SetTimerEx("Hotwire1",3000, 0 , "dd", vehicleid, playerid);
		SetTimerEx("Hotwire2",5000, 0 , "dd", vehicleid, playerid);
		SetTimerEx("Hotwire3",7000, 0 , "dd", vehicleid, playerid);
		SetTimerEx("Hotwire4",9000, 0 , "dd", vehicleid, playerid);
		SetTimerEx("SetVehicleEngine",10000, 0, "dd",  vehicleid, playerid);
		GameTextForPlayer(playerid, "~r~Hotwiring.....", 10000,4);
    }
	if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 1)
	{
		SendClientMessage(playerid,COLOR_RED,"You are already hotwiring this car.");
	}
	if(PlayerInfo[playerid][pToolKit] == 0)
    {
		SendClientMessageEx(playerid, COLOR_GREY, "You need a toolkit to hotwire this car");
    }
    return 1;
Reply
#2

I think you need to make a text file in scriptfiles for each vehicle for this (I'm NOT sure)
And then add a variable like. "cWired" -So everytime a car is loaded from scriptfiles it should be hotwired?
Just an idea
Reply
#3

Quote:
Originally Posted by prisonliferp
Посмотреть сообщение
I think you need to make a text file in scriptfiles for each vehicle for this (I'm NOT sure)
And then add a variable like. "cWired" -So everytime a car is loaded from scriptfiles it should be hotwired?
Just an idea
No i only make this car for hotwire

cars here is the car you can hotwire i make other system for the other cars so /hotwire only works on this cars

Код:
Statecar[0] = AddStaticVehicleEx(405,-101.40000153,1222.30004883,19.70000076,0.00000000,-1,-1,90000); //Sentinel
	Statecar[1] = AddStaticVehicleEx(421,-91.69999695,1222.00000000,19.70000076,0.00000000,-1,-1,90000); //Washington
	Statecar[2] = AddStaticVehicleEx(585,-84.59999847,1222.00000000,19.39999962,0.00000000,-1,-1,90000); //Emperor
	Statecar[3] = AddStaticVehicleEx(580,-51.79999924,1166.69995117,19.50000000,0.00000000,-1,-1,90000); //Stafford
	Statecar[4] = AddStaticVehicleEx(516,-41.29999924,1166.50000000,19.39999962,0.00000000,-1,-1,90000); //Nebula
	Statecar[5] = AddStaticVehicleEx(426,-30.79999924,1166.40002441,19.20000076,0.00000000,-1,-1,90000); //Premier
	Statecar[6] = AddStaticVehicleEx(445,-149.39999390,1082.69995117,19.70000076,0.00000000,-1,-1,90000); //Admiral
	Statecar[7] = AddStaticVehicleEx(540,-156.80000305,1082.59997559,19.70000076,0.00000000,-1,-1,90000); //Vincent
	Statecar[8] = AddStaticVehicleEx(507,-204.19999695,1223.40002441,19.70000076,0.00000000,-1,-1,90000); //Elegant
	Statecar[9] = AddStaticVehicleEx(551,-194.50000000,1223.50000000,19.60000038,0.00000000,-1,-1,90000); //Merit
	Statecar[10] = AddStaticVehicleEx(418,-177.69999695,1217.19995117,19.89999962,92.00000000,-1,-1,90000); //Moonbeam
	Statecar[11] = AddStaticVehicleEx(422,-177.50000000,1225.40002441,19.79999924,90.00000000,-1,-1,90000); //Bobcat
	Statecar[12] = AddStaticVehicleEx(554,-144.30000305,1186.00000000,19.89999962,0.00000000,-1,-1,90000); //Yosemite
	Statecar[13] = AddStaticVehicleEx(533,-151.19999695,1185.90002441,19.50000000,0.00000000,-1,-1,90000); //Feltzer
	Statecar[14] = AddStaticVehicleEx(475,-157.19999695,1186.00000000,19.60000038,0.00000000,-1,-1,90000); //Sabre
	Statecar[15] = AddStaticVehicleEx(479,61.09999847,1159.40002441,18.60000038,0.00000000,-1,-1,90000); //Regina
	Statecar[16] = AddStaticVehicleEx(589,50.29999924,1159.40002441,18.39999962,0.00000000,-1,-1,90000); //Club
	Statecar[17] = AddStaticVehicleEx(440,-100.59999847,1336.69995117,10.50000000,8.00000000,-1,-1,90000); //Rumpo
	Statecar[18] = AddStaticVehicleEx(546,-82.19999695,1339.30004883,10.80000019,8.00000000,-1,-1,90000); //Intruder
	Statecar[19] = AddStaticVehicleEx(540,667.20001221,1727.90002441,7.00000000,42.00000000,-1,-1,90000); //Vincent
	Statecar[20] = AddStaticVehicleEx(489,655.00000000,1717.00000000,7.40000010,40.00000000,-1,-1,90000); //Rancher
	Statecar[21] = AddStaticVehicleEx(458,681.29998779,1945.80004883,5.50000000,0.00000000,-1,-1,90000); //Solair
	Statecar[22] = AddStaticVehicleEx(526,781.70001221,1864.69995117,4.59999990,92.00000000,-1,-1,90000); //Fortune
	Statecar[23] = AddStaticVehicleEx(549,-213.39999390,2609.39990234,62.59999847,0.00000000,-1,-1,90000); //Tampa
	Statecar[24] = AddStaticVehicleEx(413,-234.19999695,2609.30004883,62.90000153,0.00000000,-1,-1,90000); //Pony
	Statecar[25] = AddStaticVehicleEx(508,-227.69999695,2728.60009766,63.09999847,0.00000000,-1,-1,90000); //Journey
	Statecar[26] = AddStaticVehicleEx(555,-334.29998779,2671.39990234,63.00000000,0.00000000,-1,-1,90000); //Windsor
	Statecar[27] = AddStaticVehicleEx(419,-1261.19995117,2713.30004883,50.00000000,30.00000000,-1,-1,90000); //Esperanto
	Statecar[28] = AddStaticVehicleEx(410,-1490.40002441,2567.00000000,55.59999847,0.00000000,-1,-1,90000); //Manana
	Statecar[29] = AddStaticVehicleEx(439,-1540.40002441,2625.80004883,55.79999924,0.00000000,-1,-1,90000); //Stallion
	Statecar[30] = AddStaticVehicleEx(482,-1516.50000000,2571.50000000,56.09999847,0.00000000,-1,-1,90000); //Burrito
	Statecar[31] = AddStaticVehicleEx(422,-1522.80004883,2571.10009766,55.90000153,0.00000000,-1,-1,90000); //Bobcat
	Statecar[32] = AddStaticVehicleEx(478,-1468.69995117,2576.30004883,55.90000153,0.00000000,-1,-1,90000); //Walton
    Statecar[33] = AddStaticVehicleEx(498,-1366.40002441,2059.89990234,52.90000153,0.00000000,-1,-1,90000); //Boxville
	Statecar[34] = AddStaticVehicleEx(499,-1192.19995117,1825.30004883,41.79999924,46.00000000,-1,-1,90000); //Benson
	Statecar[35] = AddStaticVehicleEx(475,-865.29998779,1566.59997559,24.70000076,272.00000000,-1,-1,90000); //Sabre
	Statecar[36] = AddStaticVehicleEx(496,-753.20001221,1509.09997559,25.39999962,0.00000000,-1,-1,90000); //Blista Compact
	Statecar[37] = AddStaticVehicleEx(436,-769.79998779,1440.80004883,13.69999981,0.00000000,-1,-1,90000); //Previon
	Statecar[38] = AddStaticVehicleEx(542,-308.60000610,873.09997559,9.50000000,0.00000000,-1,-1,90000); //Clover
	Statecar[39] = AddStaticVehicleEx(456,102.09999847,1108.80004883,13.89999962,0.00000000,-1,-1,90000); //Yankee
	Statecar[40] = AddStaticVehicleEx(500,182.60000610,1165.40002441,15.00000000,324.00000000,-1,-1,90000); //Mesa
	Statecar[41] = AddStaticVehicleEx(527,19.70000076,1165.50000000,19.39999962,0.00000000,-1,-1,90000); //Cadrona
	Statecar[42] = AddStaticVehicleEx(401,6.00000000,1165.00000000,19.50000000,0.00000000,-1,-1,90000); //Bravura
	Statecar[43] = AddStaticVehicleEx(478,-157.50000000,1167.19995117,19.79999924,0.00000000,-1,-1,90000); //Walton
	Statecar[44] = AddStaticVehicleEx(405,-199.39999390,1222.69995117,19.70000076,0.00000000,-1,-1,90000); //Sentinel
	Statecar[45] = AddStaticVehicleEx(413,12.69999981,1165.50000000,19.70000076,0.00000000,-1,-1,90000); //Pony
	Statecar[46] = AddStaticVehicleEx(562,-1473.30004883,2627.39990234,55.59999847,0.00000000,-1,-1,90000); //Elegy
	Statecar[47] = AddStaticVehicleEx(562,-1470.80004883,2633.69995117,55.59999847,0.00000000,-1,-1,90000); //Elegy
	Statecar[48] = AddStaticVehicleEx(560,-1466.30004883,2647.89990234,55.59999847,88.00000000,-1,-1,90000); //Sultan
	Statecar[49] = AddStaticVehicleEx(560,-1466.50000000,2643.60009766,55.59999847,88.00000000,-1,-1,90000); //Sultan
	Statecar[50] = AddStaticVehicleEx(562,-1466.19995117,2652.19995117,55.59999847,90.00000000,-1,-1,90000); //Elegy
	Statecar[51] = AddStaticVehicleEx(565,-1472.90002441,2657.00000000,55.50000000,180.00000000,-1,-1,90000); //Flash
	Statecar[52] = AddStaticVehicleEx(565,-1481.80004883,2657.10009766,55.50000000,180.00000000,-1,-1,90000); //Flash
	Statecar[53] = AddStaticVehicleEx(475,806.70001221,1679.69995117,5.19999981,0.00000000,-1,-1,90000); //Sabre
	Statecar[54] = AddStaticVehicleEx(475,799.29998779,1679.80004883,5.19999981,0.00000000,-1,-1,90000); //Sabre
	Statecar[55] = AddStaticVehicleEx(413,801.09997559,1696.69995117,5.40000010,0.00000000,-1,-1,90000); //Pony
	Statecar[56] = AddStaticVehicleEx(468,816.20001221,1684.80004883,5.00000000,0.00000000,-1,-1,90000); //Sanchez
	Statecar[57] = AddStaticVehicleEx(468,814.40002441,1684.80004883,5.00000000,0.00000000,-1,-1,90000); //Sanchez
	Statecar[58] = AddStaticVehicleEx(468,812.59997559,1684.90002441,5.00000000,0.00000000,-1,-1,90000); //Sanchez
	Statecar[59] = AddStaticVehicleEx(468,810.59997559,1684.90002441,5.00000000,0.00000000,-1,-1,90000); //Sanchez
	Statecar[60] = AddStaticVehicleEx(471,816.09997559,1689.09997559,4.90000010,0.00000000,-1,-1,90000); //Quad
	Statecar[61] = AddStaticVehicleEx(471,813.50000000,1689.19995117,4.90000010,0.00000000,-1,-1,90000); //Quad
	Statecar[62] = AddStaticVehicleEx(471,811.09997559,1689.19995117,4.90000010,0.00000000,-1,-1,90000); //Quad
	Statecar[63] = AddStaticVehicleEx(471,813.40002441,1691.80004883,4.90000010,0.00000000,-1,-1,90000); //Quad
	Statecar[64] = AddStaticVehicleEx(531,-338.89999390,1204.19995117,19.70000076,180.00000000,-1,-1,90000); //Tractor
	Statecar[65] = AddStaticVehicleEx(531,677.50000000,1194.09997559,11.99999809,336.00000000,-1,-1,90000); //Tractor
	Statecar[66] = AddStaticVehicleEx(572,-244.00000000,990.50000000,19.69999886,0.00000000,-1,-1,90000); //Mower
Reply
#4

Hmm hmm...
That one is a tough thang..
To be honest I do not really know how to do that..

Let me just get this 100% Correct:

You want cars to STAY hotwired and with engine on after a /hotwire?
Reply
#5

Quote:
Originally Posted by prisonliferp
Посмотреть сообщение
Hmm hmm...
That one is a tough thang..
To be honest I do not really know how to do that..

Let me just get this 100% Correct:

You want cars to STAY hotwired and with engine on after a /hotwire?
No. now i will explain. when you type /hotwire first time you hotwire the car and after if you try hotwire again same car i want so i say. this car i already hotwired. you understand now?
Reply
#6

Ohh!
I think I understand now, i dont really know how to send such a message to people.. But I guess you have to do something like..


IfCarIsHotwired
SendClientMessage(playerid,"This vehicle is allready hotwired!");

(You would have to make your own IfCarIsHotwired function)
Reply
#7

Quote:
Originally Posted by prisonliferp
Посмотреть сообщение
Ohh!
I think I understand now, i dont really know how to send such a message to people.. But I guess you have to do something like..


IfCarIsHotwired
SendClientMessage(playerid,"This vehicle is allready hotwired!");

(You would have to make your own IfCarIsHotwired function)
mabye you can give me exempale too do that :P
Reply
#8

Here you go.

pawn Код:
new CarHotwired[MAX_VEHICLES]; // add at top of script, you know this.

CMD:hotwire(playerid, params[])
{
     new
        string[128],
        giveplayerid,
        vehicleid = GetPlayerVehicleID(playerid);

    if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 0)
    {
        format(string, sizeof(string), "* %s Grabs his/her toolkit and begins to unzip it", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        SetTimerEx("Hotwire",1000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire1",3000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire2",5000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire3",7000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire4",9000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("SetVehicleEngine",10000, 0, "dd",  vehicleid, playerid);
        GameTextForPlayer(playerid, "~r~Hotwiring.....", 10000,4);
        //CarHotwired[vehicleid] == 1; **ADD THIS WHERE YOU DECIDE IF THE HOTWIRE WAS SUCCESSFUL OR NOT
    }
    if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 1)
        return SendClientMessage(playerid,COLOR_RED,"You are already hotwiring this car.");
    if(PlayerInfo[playerid][pToolKit] == 0)
        return SendClientMessageEx(playerid, COLOR_GREY, "You need a toolkit to hotwire this car");
    if(CarHotwired[vehicleid] == 1)
        return SendClientMessage(playerid, COLOR_RED, "Car has already been hotwired.");
    return 1;
}
Reply
#9

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Here you go.

pawn Код:
new CarHotwired[MAX_VEHICLES]; // add at top of script, you know this.

CMD:hotwire(playerid, params[])
{
     new
        string[128],
        giveplayerid,
        vehicleid = GetPlayerVehicleID(playerid);

    if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 0)
    {
        format(string, sizeof(string), "* %s Grabs his/her toolkit and begins to unzip it", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        SetTimerEx("Hotwire",1000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire1",3000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire2",5000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire3",7000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire4",9000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("SetVehicleEngine",10000, 0, "dd",  vehicleid, playerid);
        GameTextForPlayer(playerid, "~r~Hotwiring.....", 10000,4);
        //CarHotwired[vehicleid] == 1; **ADD THIS WHERE YOU DECIDE IF THE HOTWIRE WAS SUCCESSFUL OR NOT
    }
    if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 1)
        return SendClientMessage(playerid,COLOR_RED,"You are already hotwiring this car.");
    if(PlayerInfo[playerid][pToolKit] == 0)
        return SendClientMessageEx(playerid, COLOR_GREY, "You need a toolkit to hotwire this car");
    if(CarHotwired[vehicleid] == 1)
        return SendClientMessage(playerid, COLOR_RED, "Car has already been hotwired.");
    return 1;
}
thanks man rep +
Reply
#10

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Here you go.

pawn Код:
new CarHotwired[MAX_VEHICLES]; // add at top of script, you know this.

CMD:hotwire(playerid, params[])
{
     new
        string[128],
        giveplayerid,
        vehicleid = GetPlayerVehicleID(playerid);

    if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 0)
    {
        format(string, sizeof(string), "* %s Grabs his/her toolkit and begins to unzip it", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        SetTimerEx("Hotwire",1000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire1",3000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire2",5000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire3",7000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("Hotwire4",9000, 0 , "dd", vehicleid, playerid);
        SetTimerEx("SetVehicleEngine",10000, 0, "dd",  vehicleid, playerid);
        GameTextForPlayer(playerid, "~r~Hotwiring.....", 10000,4);
        //CarHotwired[vehicleid] == 1; **ADD THIS WHERE YOU DECIDE IF THE HOTWIRE WAS SUCCESSFUL OR NOT
    }
    if(PlayerInfo[playerid][pToolKit] == 1 && PlayerInfo[playerid][pHotWire] == 1)
        return SendClientMessage(playerid,COLOR_RED,"You are already hotwiring this car.");
    if(PlayerInfo[playerid][pToolKit] == 0)
        return SendClientMessageEx(playerid, COLOR_GREY, "You need a toolkit to hotwire this car");
    if(CarHotwired[vehicleid] == 1)
        return SendClientMessage(playerid, COLOR_RED, "Car has already been hotwired.");
    return 1;
}
i still have same problem :S
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)