[Ajuda] Nomes dos veнculos
#1

Bem, eu queria saber o que hб de errado nesse code.
pawn Код:
new Veiculos[212][] =
{
    "Landstalker","Bravura","Buffalo","Linerunner","Perrenial","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 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","Boxville",
    "Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B","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","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","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30",
    "Huntley","Stafford","BF-400","Newsvan","Tug","Trailer 3","Emperor","Wayfarer","Euros","Hotdog","Club",
    "Freight Carriage","Trailer 3","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
    "Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler",
    "Luggage Trailer A","Luggage Trailer B","Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
    format(string, sizeof(string), "Vocк entrou no veнculo: {FF0000}%s{FFFFFF}",Veiculos[GetVehicleModel(vehicleid) - 400]);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    new string[128];
    format(string, sizeof(string), "Vocк saiu do veнculo: {FF0000}%s{FFFFFF}",Veiculos[GetVehicleModel(vehicleid) - 400]);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    return 1;
}
Porque ao invйs dele mostrar o nome do veнculo ele estб mostrando o nъmero do veнculo no servidor:
Reply
#2

Tem certeza que sгo estas publics que registram a entrada de um jogador em algum veiculo ?

Pois no format hб %s logo seria mandado uma mensagem com uma string e nгo com um numero (no caso, o id do veiculo).

Poste a public OnPlayerStateChange.
Reply
#3

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
Tem certeza que sгo estas publics que registram a entrada de um jogador em algum veiculo ?

Pois no format hб %s logo seria mandado uma mensagem com uma string e nгo com um numero (no caso, o id do veiculo).

Poste a public OnPlayerStateChange.
Nгo tenho nada na public OnPlayerStateChange.
Reply
#4

Quote:
Originally Posted by Wendell_.
Посмотреть сообщение
Nгo tenho nada na public OnPlayerStateChange.
Код:
new VehicleNames[VEHICLES][]={
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch",
"Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington",
"Bobcat","MrWhoopee","BFInjection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino",
"Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RCBandit","Romero","Packer","Monster",
"Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee",
"Caddy","Solair","Berkley'sRCVan","Skimmer","PCJ-600","Faggio","Freeway","RCBaron","RCRaider","Glendale","Oceanic",
"Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR350","Walton","Regina","Comet",
"BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","newsChopper","Rancher","FBIRancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","BlistaCompact","PoliceMaverick","Boxville","Benson","Mesa","RCGoblin","HotringRacer",
"HotringRacer","BloodringBanger","Rancher","SuperGT","Elegant","Journey","Bike","MountainBike","Beagle","Cropdust",
"Stunt","Tanker","RoadTrain","Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","CementTruck",
"TowTruck","Fortune","Cadrona","FBITruck","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","RCTiger","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","RCCam","Launch","PoliceCar(LSPD)",
"PoliceCar(SFPD)","PoliceCar(LVPD)","PoliceRanger","Picador","S.W.A.T.Van","Alpha","Phoenix","Glendale","Sadler",
"LuggageTrailer","LuggageTrailer","StairTrailer","Boxville","FarmPlow","UtilityTrailer"};
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new string[256];
    if(newstate == 2 || newstate == 3)
	{
		format(string, sizeof(string), "~g~%s",VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400]);
		GameTextForPlayer(playerid, string, 3000, 1);
	}
    return 1;
}
Talvez Funcione... -qq
Reply
#5

Quote:
Originally Posted by wallon
Посмотреть сообщение
Код:
new VehicleNames[VEHICLES][]={
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch",
"Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington",
"Bobcat","MrWhoopee","BFInjection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino",
"Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RCBandit","Romero","Packer","Monster",
"Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee",
"Caddy","Solair","Berkley'sRCVan","Skimmer","PCJ-600","Faggio","Freeway","RCBaron","RCRaider","Glendale","Oceanic",
"Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR350","Walton","Regina","Comet",
"BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","newsChopper","Rancher","FBIRancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","BlistaCompact","PoliceMaverick","Boxville","Benson","Mesa","RCGoblin","HotringRacer",
"HotringRacer","BloodringBanger","Rancher","SuperGT","Elegant","Journey","Bike","MountainBike","Beagle","Cropdust",
"Stunt","Tanker","RoadTrain","Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","CementTruck",
"TowTruck","Fortune","Cadrona","FBITruck","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","RCTiger","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","RCCam","Launch","PoliceCar(LSPD)",
"PoliceCar(SFPD)","PoliceCar(LVPD)","PoliceRanger","Picador","S.W.A.T.Van","Alpha","Phoenix","Glendale","Sadler",
"LuggageTrailer","LuggageTrailer","StairTrailer","Boxville","FarmPlow","UtilityTrailer"};
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new string[256];
    if(newstate == 2 || newstate == 3)
	{
		format(string, sizeof(string), "~g~%s",VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400]);
		GameTextForPlayer(playerid, string, 3000, 1);
	}
    return 1;
}
Talvez Funcione... -qq
pawn Код:
C:\Users\Wendell Rocha\Desktop\0.3c\0.3c\samp03csvr_win32\gamemodes\bcs.pwn(169) : error: 017: undefined symbol "VEHICLES"
Reply
#6

Procure por isto no seu GM e poste todas as referкncias encontradas: Vocк entrou no veнculo
Reply
#7

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new string[256];
    if(newstate == 2 || newstate == 3)
    {
        format(string, sizeof(string), "~g~%s",Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400]);
        GameTextForPlayer(playerid, string, 3000, 1);
    }
    return 1;
}
Reply
#8

Isto deve resolver o seu problema :


Esta mensagem nгo й a que й enviada quando бs publics OnPlayerEnterVehicle e OnPlayerExitVehicle sгo chamadas, pois esta cor (Vermelho):


Код:
{FF0000}
Estб no cуdigo postado por vocк mas nгo aparece na mensagem na imagem, que estб totalmente branca .



Provavelmente vocк nгo compilou seu Gamemode ou estб usando uma versгo antiga do mesmo por engano .



Espero ter ajudado .
Reply
#9

Quote:
Originally Posted by Wendell_.
Посмотреть сообщение
pawn Код:
C:\Users\Wendell Rocha\Desktop\0.3c\0.3c\samp03csvr_win32\gamemodes\bcs.pwn(169) : error: 017: undefined symbol "VEHICLES"
ANYWAY skeci d postar, malz
poe no topo
Код:
#define VEHICLES 212
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)