Guten Tag liebe sa-mp.de Community, ich habe eine Frage. Und zwar wie kann ich machen das für den Besitzer des Auto, das Auto immer offen ist.
Könnt ihr mir da helfen?
/carlock:
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]);
}
}
}
{
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]);
}
}
}
MfG,
FabianLP!