Hallo Leute,
ich wollte mal fragen ob es eine Funktion gibt wie z.B. GetVehicleName(playerid) gibt, die angibt, wie das Auto heißt indem man drin sitzt, oder muss man sich selbst eine Liste machen und den einzelnen Modelids Namen zuordnen?
Hallo Leute,
ich wollte mal fragen ob es eine Funktion gibt wie z.B. GetVehicleName(playerid) gibt, die angibt, wie das Auto heißt indem man drin sitzt, oder muss man sich selbst eine Liste machen und den einzelnen Modelids Namen zuordnen?
Alles anzeigennew PlayerVehicle[212][] = {
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana",
"Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat",
"Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife",
"Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo",
"Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
"Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
"Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito",
"Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring",
"Sandking", "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B",
"Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster","Stunt", "Tanker",
"Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
"Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak",
"Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit",
"Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
"RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway",
"Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog",
"Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
"Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A",
"Luggage Trailer B", "Stairs", "Boxville", "Tiller", "Utility Trailer" };
THX ! Aber ne kleine Frage dazu, muss ich jetzt z.B. sowas ins script einfügen :
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 400) {
PlayerVehicle[1][];
... //irgendwie sowas
}
?? Oder gehts auch leichter mit deiner Liste?
den namen bekommst du raus wenn du die Modelid die du jetzt hast
GetVehicleModel(...);
Minus 400 nimmst
411-400 = 11
Autoname 11 = Infernus
So kannst du Arraywert 11 nehmen & du hast den Wagennamen
Alles anzeigenden namen bekommst du raus wenn du die Modelid die du jetzt hast
GetVehicleModel(...);
Minus 400 nimmst
411-400 = 11
Autoname 11 = Infernus
So kannst du Arraywert 11 nehmen & du hast den Wagennamen
Ah okey THX, aber geht das für jedes Fahrzeug ob Boot, ob Flugzeug, etc. in GTA SA und ist die Liste Komplett?
Sorry wenn ich so ein altes thema hochpushe , aber besser als ein neues zu erstellen
Wie kann ich machen , das wenn der spieler ein fahrzeug betritt , das ein GameText angezeigt wird , mit dem fahrzeugnamen ?
Muss ich das so richtig umständlich machen , mit OnPlayerEnterVehicle jede vehicleid abfragen ?
new VehicleName[][] = {
"Landstalker",
"Bravura",
"Buffalo",
"Linerunner",
"Pereniel",
"Sentinel",
"Dumper",
"Firetruck",
"Trashmaster",
"Stretch",
"Manana",
"Infernus",
"Voodoo",
"Pony",
"Mule",
"Cheetah",
"Ambulance",
"Leviathan",
"Moonbeam",
"Esperanto",
"Taxi",
"Washington",
"Bobcat",
"Mr Whoopee",
"BF Injection",
"Hunter",
"Premier",
"Enforcer",
"Securicar",
"Banshee",
"Predator",
"Bus",
"Rhino",
"Barracks",
"Hotknife",
"Trailer",
"Previon",
"Coach",
"Cabbie",
"Stallion",
"Rumpo",
"RC Bandit",
"Romero",
"Packer",
"Monster Truck",
"Admiral",
"Squalo",
"Seasparrow",
"Pizzaboy",
"Tram",
"Trailer",
"Turismo",
"Speeder",
"Reefer",
"Tropic",
"Flatbed",
"Yankee",
"Caddy",
"Solair",
"Berkley's RC Van",
"Skimmer",
"PCJ-600",
"Roller",
"Freeway",
"RC Baron",
"RC Raider",
"Glendale",
"Oceanic",
"Sanchez",
"Sparrow",
"Patriot",
"Quad",
"Coastguard",
"Dinghy",
"Hermes",
"Sabre",
"Rustler",
"ZR-350",
"Walton",
"Regina",
"Comet",
"Fahrrad",
"Burrito",
"Camper",
"Marquis",
"Baggage",
"Dozer",
"Maverick",
"News Chopper",
"Rancher",
"FBI Rancher",
"Virgo",
"Greenwood",
"Jetmax",
"Hotring",
"Sandking",
"Blista Compact",
"Police Maverick",
"Boxville",
"Benson",
"Mesa",
"RC Goblin",
"Hotring Racer",
"Hotring Racer",
"Bloodring Banger",
"Rancher",
"Super GT",
"Elegant",
"Journey",
"Bike",
"Mountain Bike",
"Beagle",
"Cropdust",
"Stunt",
"Tanker",
"RoadTrain",
"Nebula",
"Majestic",
"Buccaneer",
"Shamal",
"Hydra",
"FCR-900",
"NRG-500",
"HPV1000",
"Cement Truck",
"Tow Truck",
"Fortune",
"Cadrona",
"FBI Truck",
"Willard",
"Forklift",
"Traktor",
"Combine",
"Feltzer",
"Remington",
"Slamvan",
"Blade",
"Freight",
"Streak",
"Vortex",
"Vincent",
"Bullet",
"Clover",
"Sadler",
"Firetruck",
"Hustler",
"Intruder",
"Primo",
"Cargobob",
"Tampa",
"Sunrise",
"Merit",
"Utility",
"Nevada",
"Yosemite",
"Windsor",
"Monster Truck",
"Monster Truck",
"Uranus",
"Jester",
"Sultan",
"Stratum",
"Elegy",
"Raindance",
"RC Tiger",
"Flash",
"Tahoma",
"Savanna",
"Bandito",
"Freight",
"Trailer",
"Kart",
"Mower",
"Duneride",
"Sweeper",
"Broadway",
"Tornado",
"AT-400",
"DFT-30",
"Huntley",
"Stafford",
"BF-400",
"Newsvan",
"Tug",
"Trailer",
"Emperor",
"Wayfarer",
"Euros",
"Hotdog",
"Club",
"Trailer",
"Trailer",
"Andromada",
"Dodo",
"RC Cam",
"Launch",
"Streifenwagen",
"Streifenwagen",
"Streifenwagen",
"Polizei Ranger",
"Picador",
"S.W.A.T. Van",
"Alpha",
"Phoenix",
"Glendale",
"Sadler",
"Luggage Trailer",
"Luggage Trailer",
"Stair Trailer",
"Boxville",
"Farm Plow",
"Utility Trailer"
};
Unter OnPlayerStateChange:
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
{
if(IsPlayerInAnyVehicle(playerid))
{
format(string, 20, "%s",VehicleName[GetVehicleModel(vehicleid)-400]);
GameTextForPlayer(playerid, string, 2500, 1);
}
fail
Ich meinte als Textdraw
Habs jetzt so , klappt aber irgendwie nicht
public NamensTimer()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInAnyVehicle(i))
{
new vehicleid;
vehicleid=GetPlayerVehicleID(i);
new string[256];
format(string, 20, "Fahrzeug: %s",VehicleName[GetVehicleModel(vehicleid)-400]);
TextDrawSetString(fname[i],string);
TextDrawShowForPlayer(i,fname[i]);
}
else
{
TextDrawHideForPlayer(i, fname[i]);
}
}
return 1;
}
Liegt wahrscheinlich an dieser Zeile..
new Text:test;
TextDrawSetString(test,string);
versuchs ma so.
Und zeig mal deine fname Definierung
#JoKér
Hömm :o
Ich hab nen neuen timer gemacht , jetzt wird der name auf einmal angezeigt , aber mein pc hängt sich daimmer auf :o ich mach mal nen neuen thread mit dem problem