dcmd_fauto(playerid,params[])
{
frakauto[playerid] = Createfrakauto();
LoadFrakAuto(frakauto[playerid]);
ShowPlayerDialog(playerid,DIALOG_FAUTOH,DIALOG_STYLE_LIST,"Fraktionsautohaus","Streifenwagen Los Santos 40000$,","Kaufen","Abbrechen");
return 1;
}
stock Createfrakauto()
{
new query[256];
format(query, sizeof(query), "INSERT INTO `frakautos` (`autoid`) VALUES ('%d')", autoid);
mysql_query(query);
return true;
}
if(dialogid == DIALOG_FAUTOH)
{
if(response)
{
if(listitem == 0)
{
new Float:frakx,Float:fraky,Float:frakz,Float:fraka;
GetPlayerPos(playerid,frakx,fraky,frakz);
GetPlayerFacingAngle(playerid, fraka);
FAutos[frakauto[playerid]][autox] = frakx; FAutos[frakauto[playerid]][autoy] = fraky; FAutos[frakauto[playerid]][autoz] = frakz; FAutos[frakauto[playerid]][autoa] = fraka; FAutos[frakauto[playerid]][fraktionspreis] = 2; FAutos[frakauto[playerid]][fraktionsnummer] = PlayerInfo[playerid][pLeader];
FAutos[frakauto[playerid]][autogestell] = 596;
FAutos[frakauto[playerid]][farbe1] = 1;
FAutos[frakauto[playerid]][farbe2] = 79;
SaveFrakauto(frakauto[playerid]);
LoadFrakAuto(frakauto[playerid]);
frakauto[playerid] = -1;
}
}
}