if (strcmp("/carlock", cmdtext, true, 10) == 0)
{
if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
{
new Status = Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]];
new Float:dtc_X,Float:dtc_Y,Float:dtc_Z;
GetVehiclePos(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId],dtc_X,dtc_Y,dtc_Z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i,20.0,dtc_X,dtc_Y,dtc_Z))
{
PlayerPlaySound(i,1147,dtc_X,dtc_Y,dtc_Z);
}
}
switch (Status)
{
case 0:
{
GameTextForPlayer(playerid, "~w~Fahrzeug ~r~abgeschlossen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = 1;
Dtc_LockCar(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
}
case 1:
{
GameTextForPlayer(playerid, "~w~Fahrzeug ~g~aufgeschlossen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = 0;
Dtc_UnLockCar(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du besitzt Kein Fahrzeug für deinen Ausgewählten Schlüssel!");
return 1;
}
return 1;
}
Hallo ich habe eine Frage ich bin auf der suche wen ich das car abschliessen und aufschliessen das die lichter Blinken.
Vielen Dank im Vorraus!
//E:
if(newkeys == KEY_ANALOG_UP)
{
if(IsPlayerInAnyVehicle(playerid))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
if(licht[vid] == false)
{
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
licht[vid] = true;
}
else if(licht[vid] == true)
{
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
licht[vid] = false;
}
}
}