Hallo ich wollte heute das wenn einer im frakautohaus in auto einsteigt das sich ein dialog öffnet aber es tut sich nichts
hier mal der pwn code
forward FRAC_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
public FRAC_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
if(dialogid == DIALOG_FACTION_CAR_BUY){
if(response){
new Float:pPos[3];
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
SetPlayerPos(playerid,pPos[0]+2.5,pPos[1]+2.5,pPos[2]);
TogglePlayerControllable(playerid,true);
}
if(!response){
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
if(IsAllowedFactionToBuy(GetPlayerLeader(playerid))){
if(GetFactioncarsOfFaction(GetPlayerLeader(playerid)) < MAX_BUY){
new Carid1 = GetPlayerVehicleID(playerid);
for(new fbl;fbl<sizeof(FactionBuylist);fbl++){
if(Carid1 == FactionBuylist[fbl][fbCarid]){
if(GetPlayerMoney(playerid) >= FactionBuylist[fbl][fbPrice]){
//if(CallRemoteFunction("Script_GetPlayerMoney","i",playerid) >= FactionBuylist[fbl][fbPrice]){
for(new fc;fc<sizeof(FactionCars);fc++){
if(FactionCars[fc][fVehid] < 400 || FactionCars[fc][fVehid] > 611){
FactionCars[fc][fVehid] = FactionBuylist[fbl][fbVehid];
FactionCars[fc][fPos][0] = FactionBuySpawn[0];
FactionCars[fc][fPos][1] = FactionBuySpawn[1];
FactionCars[fc][fPos][2] = FactionBuySpawn[2];
FactionCars[fc][fPos][3] = FactionBuySpawn[3];
new Color[2];
GetDefaultCarColorOfFaction(GetPlayerLeader(playerid),Color[0],Color[1]);
FactionCars[fc][fCol][0] = Color[0];
FactionCars[fc][fCol][1] = Color[1];
FactionCars[fc][fPrice] = FactionBuylist[fbl][fbPrice];
for(new slot;slot<14;slot++)
FactionCars[fc][fTuning][slot] = 0;
FactionCars[fc][fCarid] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
print(">>> Nach dem Autoerstellen!");
#if defined FACTION_CARS_LOCKABLE
fLockCar(FactionCars[fc][fCarid]);
FactionCars[fc][fLocked] = true;
#endif
for(new f;f<5;f++)
{
FactionCars[fc][fFaction][f] = -255;
}
FactionCars[fc][fFaction][0] = GetPlayerLeader(playerid);
PutPlayerInVehicle(playerid,FactionCars[fc][fCarid],0);
GivePlayerMoney(playerid, -FactionBuylist[fbl][fbPrice]);
//CallRemoteFunction("Script_SetPlayerMoney","id",playerid,(CallRemoteFunction("Script_GetPlayerMoney","i",playerid)-FactionBuylist[fbl][fbPrice]));
new Float:pPos[3];
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
SetPlayerPos(playerid,pPos[0]+2.5,pPos[1]+2.5,pPos[2]);
TogglePlayerControllable(playerid,true);
SendClientMessage(playerid,FACTION_COL_YELLOW,"Glückwunsch zum neuen Fahrzeug.");
SendClientMessage(playerid,FACTION_COL_YELLOW,"Bitte vergesse nicht das Fahrzeug mit: '/fpark' umzuparken.");
SendClientMessage(playerid,FACTION_COL_YELLOW,"Das Fahrzeug steht am Ausgabepunkt bereit!");
return 1;
}
}SendClientMessage(playerid,FACTION_COL_GREY,"Die maximale Anzahl von Fraktionsfahrzeugen ist bereits erreicht.");
}else SendClientMessage(playerid,FACTION_COL_GREY,"Du hast nicht genügend Geld bei dir!");
break;
}
}
}else SendClientMessage(playerid,FACTION_COL_GREY,"Deine Fraktion hat das Limit von Fahrzeugen bereits erreicht.");
}else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht brechtigt Fraktionsfahrzeuge zu kaufen!");
new Float:pPos[3];
GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
SetPlayerPos(playerid,pPos[0]+2.5,pPos[1]+2.5,pPos[2]);
TogglePlayerControllable(playerid,true);
}
}return 1;
}return 0;
}
mfg Dark Messiahs