VehiclesName problem ? +rep
#1

Код:
 new vehName[][] = { "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" };
Код:
public LuX_SpeedoMeterUp()
{
    new Float:LPosX;
	new Float:LPosY;
	new Float:LPosZ;
	new Float:L_VehHealth;
	new LVehicleStatus[15];

	for(new i=0; i<MAX_PLAYERS; i++)
	{
	if(VehicleStatus[GetPlayerVehicleID(i)] == 1)
	{
	LVehicleStatus = "~r~Locked";
	}
	else
	{
	LVehicleStatus = "~g~Unlocked";
	}
	if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
	{
 	GetPlayerPos(i, LPosX, LPosY, LPosZ);
	GetPlayerVehicleID(i);
	GetVehicleHealth(GetPlayerVehicleID(i), L_VehHealth);
	new LuxZone[MAX_ZONE_NAME];
	GetPlayer2DZone(i, LuxZone, MAX_ZONE_NAME);
	if(LuX_SpeedoMeter[i] == 0){
	TextDrawShowForPlayer(i, LBox[i]);
    TextDrawShowForPlayer(i, LLine1[i]);
	TextDrawShowForPlayer(i, LLine2[i]);
	TextDrawShowForPlayer(i, Lmph[i]);
    TextDrawShowForPlayer(i, LFunc[i]);
	LuX_SpeedoMeter[i] = 1;	}

	format(lstring,sizeof(lstring),"~b~Vehicle: ~w~%s~n~~b~Health: ~w~%.2f~n~~b~Fuel: ~w~%d %%~n~~b~Gps: ~w~%s~n~~b~Status: %s",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth,Gas[GetPlayerVehicleID(i)],LuxZone,LVehicleStatus);
	TextDrawSetString(LFunc[i], lstring);

	if(L_VehHealth <= 500){
	format(lstring,sizeof(lstring),"%sVehicle: ~w~%s~n~%sHealth: ~w~~r~%.2f~n~%sFuel: ~w~%d %%~n~%sGps: ~w~%s",CategoriesColor,vehName[GetVehicleModel(GetPlayerVehicleID(i))-400],CategoriesColor,L_VehHealth,CategoriesColor,Gas[GetPlayerVehicleID(i)],CategoriesColor,LuxZone);
	TextDrawSetString(LFunc[i], lstring);
    }
	}
	LuX_ReadPlayerPosition[i][ReadX] = LPosX, LuX_ReadPlayerPosition[i][ReadY] = LPosY, LuX_ReadPlayerPosition[i][ReadZ] = LPosZ;}
	for(new i=0; i<MAX_PLAYERS; i++){
	if(!IsPlayerInAnyVehicle(i)){
	TextDrawHideForPlayer(i, LBox[i]);
	TextDrawHideForPlayer(i, LLine1[i]);
	TextDrawHideForPlayer(i, LLine2[i]);
	TextDrawHideForPlayer(i, Lmph[i]);
	TextDrawHideForPlayer(i, LFunc[i]);
	LuX_SpeedoMeter[i] = 0;
	}
	}
	return 1;
}

Код:
format(lstring,sizeof(lstring),"~b~Vehicle: ~w~%s~n~~b~Health: ~w~%.2f~n~~b~Fuel: ~w~%d %%~n~~b~Gps: ~w~%s~n~~b~Status: %s",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400],L_VehHealth,Gas[GetPlayerVehicleID(i)],LuxZone,LVehicleStatus);
	TextDrawSetString(LFunc[i], lstring);
When i enter in a NRG-500(522 model) ,vehicle id 710 the string shows "INFERNUS".
vehicle before 500 went ok, after 700 it's wrong
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)