Schönen Guten Abend,
ich suche schon vergebens seit 5 Stunden nach einem /v Befehl womit ich auch /v nrg eingeben kann. Ich habe es Bisher nur so das ich das mit der ModelID machen kann.
Das ist das was ich bisher habe.
CMD:v(playerid, params[])
{
if(GetPVarInt(playerid, "test") < 4)
{
SetPVarInt(playerid, "test", GetPVarInt(playerid, "test") +1);
new ModelID, Float:VehPos[4], vehicleid;
new color1 = random(252);
new color2 = random(252);
if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return SendClientMessage(playerid,0xB0AFB0FF,"Du bist nicht zu Fuß unterwegs!");
if(sscanf(params, "d",ModelID)) return SendClientMessage(playerid,0xB0AFB0FF, "Benutze: /v [vehicleid]");
if(ModelID < 400 || ModelID > 611) return SendClientMessage(playerid,0xB0AFB0FF, "Die VehicleID muss zwischen 400 und 611 liegen");
GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
GetPlayerFacingAngle(playerid, VehPos[3]);
vehicleid = CreateVehicle(ModelID,VehPos[0],VehPos[1],VehPos[2],VehPos[3],color1,color2,-1);
LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, vehicleid, 0);
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
motor[vid] = true;
}
if(GetPVarInt(playerid, "test") == 4)
{
SendClientMessage(playerid, COLOR_ROT, "Alle Slots sind belegt, lösche mit /des (im Wagen)");
}
return 1;
}
Man kann hier auch erkennen das ich das Spawnenbegrenzt habe Leider macht er das bei mir so das wenn ich das 4te mal /v ... eingebe das er Zeigt ein Fahrzeug spawnt und im selben Moment auch schreibt das alle Slots belegt sind weiß da jemand eine Andere Lösung für das er das erst anzeigt wenn ich es das nächste mal eingebe. Wenn nicht dann halb so wild.
Wäre wirklich sehr Nett wenn mir jemand den Befehl so erweitern könnte das das geht mit dem /v [VehicleName].
Das habe ich auch schon.
new pAllVehicleNames[][] =
{
"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", "Previon", "Coach",
"Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow",
"Pizzaboy", "Tram", "Trailer", "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", "Hustler", "Intruder",
"Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster",
"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", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
"Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car", "Police Car", "Police Car",
"Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs",
"Boxville", "Tiller", "Utility Trailer"
};
Danke schonmal im vorraus.