22.12.2011, 01:13
i have hotwire system on my server and want so ppl cannot use /engine on the hotwire car pls help
here is engine cmd
here is hotwire command
here is engine cmd
Код:
}
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;


