Hallo Breadfish,
ich hab Problem,
so kann man sich auch Geld machen aufm Server undzwar:
Wenn man /fcarsell macht createt sich das Car nach dem restart wieder!
if(strcmp(cmd, "/fcarsell",true) == 0)
{
new vehi;
vehi = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pLeader] == 1)
{
for(new i = 0; i < sizeof(PDCars); i++)
{
if(vehi == PDCars[i])
{
SellFcar(playerid, vehi);
}
}
}
else if(PlayerInfo[playerid][pLeader] == 1)
{
for(new i = 0; i < sizeof(SFCars); i++)
{
if(vehi == SFCars[i])
{
SellFcar(playerid, vehi);
}
}
}
Function SellFcar(playerid, AutomobildID)
{
new Automobildmodel = GetVehicleModel(AutomobildID);
new FCarPrice;
if(Automobildmodel == 427){FCarPrice = FcarEnforcer;}
else if(Automobildmodel == 596){FCarPrice = FcarStreifenwagen;}
else if(Automobildmodel == 430){FCarPrice = FcarBoot;}
else if(Automobildmodel == 597){FCarPrice = FcarStreifenwagenSF;}
else if(Automobildmodel == 541){FCarPrice = FcarBullet;}
else if(Automobildmodel == 599){FCarPrice = FcarPranger;}
else if(Automobildmodel == 601){FCarPrice = FcarWasserwerfer;}
else if(Automobildmodel == 497 || Automobildmodel == 469){FCarPrice = FcarHelikopter;}
else if(Automobildmodel == 463){FCarPrice = FcarGmotorrad;}
else if(Automobildmodel == 490){FCarPrice = FcarEinsatzleitung;}
else if(Automobildmodel == 528){FCarPrice = FcarPtruck;}
else if(Automobildmodel == 523){FCarPrice = FcarPmotorrad;}
else if(Automobildmodel == 490){FCarPrice = FcarRanger;}
else if(Automobildmodel == 560){FCarPrice = FcarSultan;}
else if(Automobildmodel == 425){FCarPrice = FcarKampfhelikopter;}
else if(Automobildmodel == 520){FCarPrice = FcarHydra;}
else if(Automobildmodel == 490){FCarPrice = FcarNotarzt;}
else if(Automobildmodel == 426){FCarPrice = FcarPremier;}
else if(Automobildmodel == 431){FCarPrice = FcarBus;}
else if(Automobildmodel == 432){FCarPrice = FcarPanzer;}
else if(Automobildmodel == 433){FCarPrice = FcarTruck;}
else if(Automobildmodel == 470){FCarPrice = FcarPatriot;}
else if(Automobildmodel == 598){FCarPrice = FcarArmypolizei;}
else if(Automobildmodel == 416){FCarPrice = FcarRettungswagen;}
else if(Automobildmodel == 563){FCarPrice = FcarRettungsheli;}
else if(Automobildmodel == 517){FCarPrice = FcarMajestic;}
else if(Automobildmodel == 579){FCarPrice = FcarHuntley;}
else if(Automobildmodel == 451){FCarPrice = FcarTurismo;}
else if(Automobildmodel == 560){FCarPrice = FcarSultan;}
else if(Automobildmodel == 567){FCarPrice = FcarSavanna;}
else if(Automobildmodel == 522){FCarPrice = FcarNRG;}
else if(Automobildmodel == 482){FCarPrice = FcarBurrito;}
else if(Automobildmodel == 409){FCarPrice = FcarLimousine;}
else if(Automobildmodel == 507){FCarPrice = FcarSchutzauto;}
else if(Automobildmodel == 582){FCarPrice = FcarCNNvan;}
else if(Automobildmodel == 488){FCarPrice = FcarCNNHeli;}
else if(Automobildmodel == 586){FCarPrice = FcarCNNmotorrad;}
else if(Automobildmodel == 420){FCarPrice = FcarTaxi;}
else if(Automobildmodel == 438){FCarPrice = FcarCabbie;}
else if(Automobildmodel == 407){FCarPrice = FcarLoeschfahrzeug;}
else if(Automobildmodel == 416){FCarPrice = FcarMehrzweckfahrzeug;}
else if(Automobildmodel == 544){FCarPrice = FcarDrehleiter;}
else if(Automobildmodel == 552){FCarPrice = FcarSicherungsfahrzeug;}
else if(Automobildmodel == 525){FCarPrice = Abschleppfahrzeug;}
else {return SendClientMessage(playerid,COLOR_LIGHTGREEN,"Ungültiges Automobilmodel !");}
GivePlayerMoney(playerid, FCarPrice/2);
new Fcarsellstring[128];
DestroyVehicle(AutomobildID);
format(Fcarsellstring,sizeof(Fcarsellstring),"Du hast das Auto mit dem Model %d für $%d verkauft",Automobildmodel,FCarPrice/3);
SendClientMessage(playerid,COLOR_LIGHTGREEN,Fcarsellstring);
return 1;
}
LG