Ich bräuchte den /carsell befehl da der immernoch nicht die hälfte des Geldes rausspuckt
if(strcmp("/carsell", cmdtext, true, 10) == 0)
{
if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
{
//CallRemoteFunction("moneygive","ii",playerid,PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis] / 2);
//GivePlayerMoney(playerid, PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis] / 2);
CallRemoteFunction("M_GivePlayerMoney","id",playerid,PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis] / 2);
Dtc_Carlock[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]] = 0;
Dtc_UnLockCar(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
DestroyVehicle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,Dtc_PlayerKey[playerid]);
fremove(string3);
Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]] = 0;
SendClientMessage(playerid, COLOR_YELLOW, " Fahrzeug erfolgreich verkauft, Hälfte des Kaufpreises wird wurde dir wieder gegeben!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du besitzt Kein Fahrzeug!");
return 1;
}
return 1;
}
Kann wer helfen ??