if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,5.0,797.6604,-618.7686,16.3359))
{
new zufall2 = random(4);
if(zufall2 == 1)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1008);
AddVehicleComponent(GetPlayerVehicleID(playerid),1075);
ChangeVehicleColor(GetPlayerVehicleID(playerid),000,000);
GivePlayerMoney(playerid,-750);
GameTextForPlayer(playerid,"Vehicle getuned!",3000,2);
}
else if(zufall2 == 2)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1008);
AddVehicleComponent(GetPlayerVehicleID(playerid),1078);
ChangeVehicleColor(GetPlayerVehicleID(playerid),001,000);
GivePlayerMoney(playerid,-750);
GameTextForPlayer(playerid,"Vehicle getuned!",3000,2);
}
else if(zufall2 == 3)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1008);
AddVehicleComponent(GetPlayerVehicleID(playerid),1074);
ChangeVehicleColor(GetPlayerVehicleID(playerid),180,003);
GivePlayerMoney(playerid,-750);
GameTextForPlayer(playerid,"Vehicle getuned!",3000,2);
}
else if(zufall2 == 4)
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1008);
AddVehicleComponent(GetPlayerVehicleID(playerid),1073);
ChangeVehicleColor(GetPlayerVehicleID(playerid),006,183);
GivePlayerMoney(playerid,-750);
GameTextForPlayer(playerid,"Vehicle getuned!",3000,2);
}
}
}
Es passiert einfach nichts, wenn ich mit dem Auto da hin fahre. Wo kommt das ins Script hin? OnPlayerCommand? OnPlayerText?
Danke.