Textdraw string, Getting veh name
#1

Textdraw doesn't works.
Problem must be in getting vehicle name I think.
Код:
new VehicleNames[][] =
{
    "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", "Boxville", "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", "Stratium",
    "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"
};

stock GetVehicleName(vehicleid)
{
	new String[12];
    format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
    return String;
}

//ONPLAYERSPAWN
	new string[12];
	format(string, sizeof(string), "Garage - ~g~%s", GetVehicleName(actualcar[playerid]));
	PlayerTextDrawSetString(playerid, mainmenu1[playerid], string);
	PlayerTextDrawShow(playerid, mainmenu1[playerid]);
Got another one problem.
Vaules are not creating.
Код:
    new player[64];
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
    format(player,sizeof(player), ACCOUNTS ,PlayerName);
    dini_Create(player);
    dini_Set(player,"Password",key);
    dini_IntSet(player,"Money",3000);
    dini_IntSet(player,"Points",0);
    dini_IntSet(player,"ActualCar",503);
    dini_IntSet(player,"ClassC-HAVE",1);
    dini_IntSet(player,"ClassC-COLOR1",23);
    dini_IntSet(player,"ClassC-COLOR2",23);
    dini_FloatSet(player,"ClassC-HEALTH",1000.0);
    dini_IntSet(player,"ClassC-TIRES",60);
    dini_IntSet(player,"ClassB-HAVE",0);
    dini_IntSet(player,"ClassB-COLOR1",23);
    dini_IntSet(player,"ClassB-COLOR2",23);
    dini_FloatSet(player,"ClassB-HEALTH",1000.0);
    dini_IntSet(player,"ClassB-TIRES",60);
    dini_IntSet(player,"ClassA-HAVE",0);
    dini_IntSet(player,"ClassA-COLOR1",23);
    dini_IntSet(player,"ClassA-COLOR2",23);
    dini_FloatSet(player,"ClassA-HEALTH",1000.0);
    dini_IntSet(player,"ClassA-TIRES",60);
i know dini is slow but i already doing it in this system.


REP++++
Reply
#2

pawn Код:
format(string, sizeof(string), "Garage - ~g~%s", GetVehicleName(GetPlayerVehicleID(playerid));
Reply
#3

alright done,
now about stats at registration. anyone could, please?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)