}
CMD:engine(playerid, params[])
{
new
giveplayerid,
string[128],
engine,
lights,
alarm,
doors,
bonnet,
boot,
objective,
vehicleid = GetPlayerVehicleID(playerid);
vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleEngine(vehicleid, playerid);
format(string, sizeof(string), "* %s spins a key and turn the vehicle engine off", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
{
SetTimerEx("SetVehicleEngine", 3500, 0, "dd", vehicleid, playerid);
format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}
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 the toolkit, then begins to unzip the toolkit", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("SetVehicleEngine",5500, 0, "dd", vehicleid, playerid);
GameTextForPlayer(playerid, "~w~Hotwiring!", 5500,4);
}
if(PlayerInfo[playerid][pToolKit] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You need a toolkit to hotwire this car");
}
return 1;
if(PlayerInfo[playerid][pHotWire] != 0) return SendClientMessage(playerid,color,"You are already hotwiring.");
|
[CODE]if(PlayerInfo[playerid][pHotWire] != 0) return SendClientMessage(playerid,color,"You are already hotwiring.");
|
|
i want like when you type on hotwire cars you cannot start engine on this car you need to hotwire this car
|
|
I don't understand. The ending/middle of your sentence is conflicting with the beginning of it. What do you exactly want?
|
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 the toolkit, then begins to unzip the toolkit", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("SetVehicleEngine",5500, 0, "dd", vehicleid, playerid);
GameTextForPlayer(playerid, "~w~Hotwiring!", 5500,4);
PlayerInfo[playerid][pEngine] = 1; // Replace [pEngine] with your variable, and make sure the engine is ON
}
if(PlayerInfo[playerid][pToolKit] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You need a toolkit to hotwire this car");
}
return 1;
}
CMD:engine(playerid, params[])
{
new
giveplayerid,
string[128],
engine,
lights,
alarm,
doors,
bonnet,
boot,
objective,
vehicleid = GetPlayerVehicleID(playerid);
vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleEngine(vehicleid, playerid);
format(string, sizeof(string), "* %s spins a key and turn the vehicle engine off", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
{
SetTimerEx("SetVehicleEngine", 3500, 0, "dd", vehicleid, playerid);
format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
IsASateCar(carid)
{
for(new v = 0; v < sizeof(Statecar); v++)
{
if(carid == Statecar[v]) return 1;
}
return 0;