if(SupCar[playerid] != 999)
{
DestroyVehicle(SupCar[playerid]);
SupCar[playerid] = 999;
}
if(!strcmp(cmd, "/supcar", true))
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
return SendClientMessage(playerid, COLOR_RED, "* Du bist nicht befugt.");
}
if(SupCar[playerid] != 999)
{
DestroyVehicle(SupCar[playerid]);
SendClientMessage(playerid, COLOR_LIGHTRED, "* Supporterfahrzeug gelöscht.");
SupCar[playerid] = 999;
}
else
{
ShowPlayerDialog(playerid,DIALOG_supcar,DIALOG_STYLE_MSGBOX,"Suppcar","Welches fahrzeug möchtest du haben.","NRG","Sultan");
}
return 1;
}
if(dialogid == DIALOG_supcar)
{
if(response)
{
new Float:xb, Float:yb, Float:zb, Float:zab;
GetPlayerPos(playerid, xb, yb, zb);
GetPlayerFacingAngle(playerid, zab);
SupCar[playerid] = CreateVehicle(522, xb, yb, zb, zab, 22, 22, -1);
PutPlayerInVehicle(playerid, SupCar[playerid], 0);
SendClientMessage(playerid, COLOR_GREEN, "* Supportercar erstellt.");
new VID;
new FillUp;
VID = GetPlayerVehicleID(playerid);
FillUp = GetGasMax(GetVehicleModel(VID)) - Gas[VID];
Gas[VID] += FillUp;
new pname[MAX_PLAYERS];
GetPlayerName(playerid,pname,sizeof pname);
new adminmeldung[128];
SendAdminMessage(0xFF0069FF,"------------------------------- [ Supportercar] -------------------------------");
format(adminmeldung, sizeof(adminmeldung), "%s [ID: %d] hat sich ein Supporterfahrzeug gespawnt.", pname,playerid);
SendAdminMessage(COLOR_GRAD1, adminmeldung);
return 1;
}
else
{
new Float:xb, Float:yb, Float:zb, Float:zab;
GetPlayerPos(playerid, xb, yb, zb);
GetPlayerFacingAngle(playerid, zab);
SupCar[playerid] = CreateVehicle(560, xb, yb, zb, zab, 128, 128, -1);
PutPlayerInVehicle(playerid, SupCar[playerid], 0);
SendClientMessage(playerid, COLOR_GREEN, "* Supportercar erstellt.");
SetVehicleNumberPlate(SupCar[playerid], "LiS-Admin");
new VID;
new FillUp;
VID = GetPlayerVehicleID(playerid);
FillUp = GetGasMax(GetVehicleModel(VID)) - Gas[VID];
Gas[VID] += FillUp;
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s hat sich ein Supporterfahrzeug gespawnt.", sendername);
ABroadCast(0x00F5FFFF,string,4);
return 1;
}
}
Wie kann ich Tuningteile auf den Sultan machen?