vasy Posted June 29, 2013 Report Share Posted June 29, 2013 for(new p = 0; p < GetMaxPlayers(); p++) if(IsPlayerConnected(p) && !IsPlayerNPC(p)) { new string[256]; new vehicleid = GetPlayerVehicleID(p); format(string,sizeof string ,"{B7FF00}Marca: {00FFEE}%s", VehicleName[GetVehicleModel(vehicleid)-400]); } am aceasta functie nu imi da nici o erroare nici un warnig dar nu imi apare de ce :| new VehicleName[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" };cu acest dialog de masini <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
kiLLers Posted June 29, 2013 Report Share Posted June 29, 2013 Attach3DTextLabelToVehicle unde e ? Link to comment Share on other sites More sharing options...
vasy Posted June 30, 2013 Author Report Share Posted June 30, 2013 for(new p = 0; p < GetMaxPlayers(); p++) if(IsPlayerConnected(p) && !IsPlayerNPC(p)) { new vehicleid = GetPlayerVehicleID(p); new Text3D:vehicle3Dtext[MAX_VEHICLES],vehicle_id; if(vehicleid) { new string[512], Float:X, Float:Y, Float:Z, Float:PointToPoint, Float:vhealth; GetVehicleVelocity(vehicleid, X, Y, Z); PointToPoint = (floatsqroot(floatpower(X, 2) + floatpower(Y, 2) + floatpower(Z, 2)))*100; GetVehicleHealth(vehicleid,vhealth); format(string,sizeof string ,"{B7FF00}Marca: {00FFEE}%s\n{B7FF00}Rezistenta: {00FFEE}%.2f\n{B7FF00}Viteza: {00FFEE}%i km/h\n{B7FF00}Combustibil: {00FFEE}%i %", VehicleName[GetVehicleModel(vehicleid)-400], vhealth, floatround(PointToPoint, floatround_floor)); Attach3DTextLabelToVehicle( vehicle3Dtext[ vehicle_id ] , vehicle_id, 0.0, 0.0, 2.0); DeletePlayer3DTextLabel(p, speedo3Dtext); speedo3Dtext = CreatePlayer3DTextLabel(p, string, speedcolor, 0.0,-1.6,-0.35,20.0, INVALID_PLAYER_ID, vehicleid); } else if(p) { DeletePlayer3DTextLabel(p, speedo3Dtext); } }acum ce mai e gresit :| <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
vasy Posted June 30, 2013 Author Report Share Posted June 30, 2013 nimeni?! :D <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
DarkyTheAngel Posted June 30, 2013 Report Share Posted June 30, 2013 [pawn]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[64]; format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]); return String;}[/pawn][pawn]public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && !IsPlayerNPC(i)) { new string[256]; new vehicleid = GetPlayerVehicleID(i); format(string,sizeof string ,"{B7FF00}Marca: {00FFEE}%s", GetVehicleName(vehicleid)); } return 1;}[/pawn]N-am mai stat sa aranjez codul, pentru ca nu isi are rostul.Incearca sa vezi daca apare cu codul pe care ti l-am dat eu. Link to comment Share on other sites More sharing options...
vasy Posted June 30, 2013 Author Report Share Posted June 30, 2013 C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6658) : warning 219: local variable "vehicleid" shadows a variable at a preceding level C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6659) : error 017: undefined symbol "GetVehicleName" C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6658) : warning 204: symbol is assigned a value that is never used: "vehicleid" C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(7401) : error 021: symbol already defined: "OnPlayerEnterVehicle"niste erori :D <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
Time Posted June 30, 2013 Report Share Posted June 30, 2013 Defineste simbolul "GetVehicleName".Si o sa iti mearga[pawn]if( strcmp(cmdtext, "/masini", true)==0) { SendClientMessage(playerid, COLOR_GREEN, "| ______________________ Masini FT:RP ___________________|"); SendClientMessage(playerid, 0x33CCFFAA, "Level 2 : Walton / Merit / Campo / Sadler / Yosemite / Picador / Perenial / Tornado / Regina"); SendClientMessage(playerid, 0x33CCFFAA, "Level 3 : Bobcat / Windsor / Bravura / Hermes / Blista / Hustler / Tampa / Clover / Sabre / Slamvan / LandStalker / Solair / Vincent"); SendClientMessage(playerid, 0x33CCFFAA, "Level 4 : Burrito / Journey / Virgo / Majestic / Stallion / Voodoo / Remington / Blade / Oceanic / Greenwood / Stratum"); SendClientMessage(playerid, 0x33CCFFAA, "Level 5 : Rancher / Buffalo / Uranus / Jester / Flash / Euros / Alpha / Pheonix / NRG / Tahoma "); SendClientMessage(playerid, 0x33CCFFAA, "Level 6 : Banshee / Zr350 / Comet / Sultan / Savanna / Elegy / Washington"); SendClientMessage(playerid, 0x33CCFFAA, "Level 7 : Cheetah / Mesa / Huntley / Bus / Hotring / ATV"); SendClientMessage(playerid, 0x33CCFFAA, "Level 9 : Infernus / SuperGT / Turismo / Bullet / Sandking "); SendClientMessage(playerid, 0x33CCFFAA, "Foloseste: {CC3300}/v numemasina [idculoare1] [idculoare2] {33CCFF}si fa-ti o masina free daca ai level!"); SendClientMessage(playerid, COLOR_GREEN, "|_____________________________________________________|"); return 1; }[/pawn] Link to comment Share on other sites More sharing options...
DarkyTheAngel Posted June 30, 2013 Report Share Posted June 30, 2013 C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6658) : warning 219: local variable "vehicleid" shadows a variable at a preceding level C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6659) : error 017: undefined symbol "GetVehicleName" C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6658) : warning 204: symbol is assigned a value that is never used: "vehicleid" C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(7401) : error 021: symbol already defined: "OnPlayerEnterVehicle"niste erori Verifica postul meu anterior.Am pus acolo si un "stock".Defineste simbolul "GetVehicleName".Si o sa iti mearga[pawn]if( strcmp(cmdtext, "/masini", true)==0) { SendClientMessage(playerid, COLOR_GREEN, "| ______________________ Masini FT:RP ___________________|"); SendClientMessage(playerid, 0x33CCFFAA, "Level 2 : Walton / Merit / Campo / Sadler / Yosemite / Picador / Perenial / Tornado / Regina"); SendClientMessage(playerid, 0x33CCFFAA, "Level 3 : Bobcat / Windsor / Bravura / Hermes / Blista / Hustler / Tampa / Clover / Sabre / Slamvan / LandStalker / Solair / Vincent"); SendClientMessage(playerid, 0x33CCFFAA, "Level 4 : Burrito / Journey / Virgo / Majestic / Stallion / Voodoo / Remington / Blade / Oceanic / Greenwood / Stratum"); SendClientMessage(playerid, 0x33CCFFAA, "Level 5 : Rancher / Buffalo / Uranus / Jester / Flash / Euros / Alpha / Pheonix / NRG / Tahoma "); SendClientMessage(playerid, 0x33CCFFAA, "Level 6 : Banshee / Zr350 / Comet / Sultan / Savanna / Elegy / Washington"); SendClientMessage(playerid, 0x33CCFFAA, "Level 7 : Cheetah / Mesa / Huntley / Bus / Hotring / ATV"); SendClientMessage(playerid, 0x33CCFFAA, "Level 9 : Infernus / SuperGT / Turismo / Bullet / Sandking "); SendClientMessage(playerid, 0x33CCFFAA, "Foloseste: {CC3300}/v numemasina [idculoare1] [idculoare2] {33CCFF}si fa-ti o masina free daca ai level!"); SendClientMessage(playerid, COLOR_GREEN, "|_____________________________________________________|"); return 1; }[/pawn]Realizezi ca i-ai dat o comanda si nu o variabila/un "stock" sau un "callback", nu? Link to comment Share on other sites More sharing options...
vasy Posted June 30, 2013 Author Report Share Posted June 30, 2013 tot imi spune sa il definesc stiu pun #define OnPlayerEnterVehicle si mai ce simpliuC:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6387) : warning 219: local variable "vehicleid" shadows a variable at a preceding level C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(7421) : error 021: symbol already defined: "OnPlayerEnterVehicle" <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
DarkyTheAngel Posted June 30, 2013 Report Share Posted June 30, 2013 tot imi spune sa il definesc stiu pun #define OnPlayerEnterVehicle si mai ce simpliuC:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(6387) : warning 219: local variable "vehicleid" shadows a variable at a preceding level C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(7421) : error 021: symbol already defined: "OnPlayerEnterVehicle"Cum sa pui ma #define OnPlayerEnterVehicle? Iti spune chestia aia pentru ca ai public-ul OnPlayerEnterVehicle de mai multe ori in script. Link to comment Share on other sites More sharing options...
vasy Posted June 30, 2013 Author Report Share Posted June 30, 2013 inca una si te las ) [pawn]C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(7430) : warning 219: local variable "vehicleid" shadows a variable at a preceding leve[/pawn]si sa stii ca iti multumesc pentru tot ajutorul acordat si timpul pierdut cu mine <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
DarkyTheAngel Posted June 30, 2013 Report Share Posted June 30, 2013 inca una si te las ) [pawn]C:\Users\KyLLeR\Desktop\JP trucking\gamemodes\PPC_Trucking.pwn(7430) : warning 219: local variable "vehicleid" shadows a variable at a preceding leve[/pawn]si sa stii ca iti multumesc pentru tot ajutorul acordat si timpul pierdut cu mineSimbolul "vehicleid" este definit de mai multe ori.Presupun ca aici este eroarea:[pawn]public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && !IsPlayerNPC(i)) { new string[256]; new vehicleid = GetPlayerVehicleID(i); format(string,sizeof string ,"{B7FF00}Marca: {00FFEE}%s", GetVehicleName(vehicleid)); } return 1;}[/pawn]Prima data nu am fost nici eu atent, si nu am remarcat greselile.Codul corect ar fi:[pawn]public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){ for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && !IsPlayerNPC(i)) { new lstring[256]; format(lstring,lsizeof string ,"{B7FF00}Marca: {00FFEE}%s", GetVehicleName(vehicleid)); vehicle3Dtext[vehicleid] = Create3DTextLabel(lstring, 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1); Attach3DTextLabelToVehicle(vehicle3Dtext[vehicleid] , vehicleid, 0.0, 0.0, 2.0); } return 1;}[/pawn] Link to comment Share on other sites More sharing options...
vasy Posted June 30, 2013 Author Report Share Posted June 30, 2013 multam dati tc <a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a> Link to comment Share on other sites More sharing options...
Question
vasy
cu acest dialog de masini
<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>
Link to comment
Share on other sites
12 answers to this question
Recommended Posts