Hallo Leute.
Ich habe mal eine Frage, nämlich, wie kann ich abfragen, in welchem Auto er sitzt, also so zu sagen:
if(....................)
{
GivePlayerMoney(playerid,-40000);
}
Hier mal mein Code:
if(response==1)
{
if(....................); // hier dann die if abgrage, in welchem auto er sich befindet.
if(GetPlayerMoney(playerid) >= 3000)
{
new vid, carid;
carid = GetPlayerVehicleID(playerid);
vid = GetVehicleModel(carid);
//CreateVehicle(vid,1283.4419,-1668.5536,13.5469,286.0543, 0, 1,600);
GivePlayerMoney(playerid,-3000);
//CreateVehicle(406,1283.4419,-1668.5536,13.5469,286.0543, 0, 1,600);
SetPVarInt(playerid, "Autoid",vid);
SetPVarFloat(playerid,"x",1283.4419);
SetPVarFloat(playerid,"y",-1668.5536);
SetPVarFloat(playerid,"z",13.5469);
SpielerSpeichern(playerid);
LoadAccount(playerid);
PlayerCar[playerid]=CreateVehicle(GetPVarInt(playerid,"Autoid"),GetPVarFloat(playerid,"x"),GetPVarFloat(playerid,"y"),GetPVarFloat(playerid,"z"), 82.2873, 0, 1, 60);
SendClientMessage(playerid,BLAU,"Erfolgreich gekauft.");
PutPlayerInVehicle(playerid,PlayerCar[playerid], 0);
}
}