new PlayerHaul[300][pHaul];
if(IsATruck(newcar))
{
format(string, sizeof(string), "Produkte: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
SendClientMessage(playerid, COLOR_WHITE, "INFO: Beliefere Businesses mit Produkten.");
SendClientMessage(playerid, COLOR_WHITE, "INFO: Benutze /load /buyprods /sellprods");
}
PlayerHaul[210][pCapasity] = 5;
PlayerHaul[211][pCapasity] = 5;
PlayerHaul[212][pCapasity] = 5;
PlayerHaul[213][pCapasity] = 5;
PlayerHaul[214][pCapasity] = 5;
PlayerHaul[215][pCapasity] = 5;
PlayerHaul[216][pCapasity] = 5;
PlayerHaul[217][pCapasity] = 5;
PlayerHaul[218][pCapasity] = 5;
PlayerHaul[219][pCapasity] = 5;
PlayerHaul[220][pCapasity] = 5;
PlayerHaul[221][pCapasity] = 5;
PlayerHaul[222][pCapasity] = 5;
PlayerHaul[223][pCapasity] = 5;
bitte schen
Beiträge von huGGy
-
-
wenn ich in meinen truck steige, kommt der text mit den
command und es steht imma 0/0 prods da.
kann mir jemand sagen wie ich das wegbekomme -
Kann mir jemand sagen wie ich die schrift von Cars verändern kann?
-
http://www.pawn.pastebin.com/mb3cb3b5
hir hasste complett -
welchen code brauchste
-
Ja es ist ein GF abba der Absatz ist zu groß
-
Wie mache ich das man die NobbCars ohne CarLic fahren kann?
-
so wenn spieler connecten sich einloggen und
spawnen wollen fallen sie gleich mit 0 hp um
obwohl sie eigendlich volle hp und rüstung haben
müssten ich brauche dringebd und schnell hilfeich bitte um eure hilfe
-
#include <a_samp>
#define SLOTS 200
#define GasMax 100
#if defined TANK_SYS
new Text:TT_1[MAX_PLAYERS];
#endif#if defined TANK_SYS
tank,
hat_tank,
#endif
#if defined TANK_SYSenum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}new SavePlayerPos[SLOTS][SavePlayerPosEnum];
new Text:Speedo[SLOTS];
new UpdateSeconds;
new CarName[][] =
{
"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", "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"
};forward UpdateSpeed();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("----------------------------------------");
print("--------------------------------------\n");
SetTimer("UpdateSpeed",1000, 1);
return 1;
}
SetTimer("Update_Tank",18000,1);
for(new i = 0;i<MAX_VEHICLES;i++)
{
AUTOX[i][tank] = (100);
AUTOX[i][hat_tank] = (1);
}
}
#endifpublic OnFilterScriptExit()
{
return 1;
}main()
{
}public OnPlayerConnect(playerid)
{return 1;
}public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid, Speedo[playerid]);
}
return 1;
}public UpdateSpeed()
{
new Float:x,Float:y,Float:z;
new Float:distance,value,string[256];
new Float:health;
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
TextDrawDestroy(Speedo[i]);
}
}for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~ ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f % ~n~ ~p~Tank : %d/100",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1000),health);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
AUTOX[vehicleid][hat_tank] = 1;
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
}
und hir die errorsC:\Users\Administrator\Desktop\speedo.pwn(99) : error 017: undefined symbol "Speedo"
C:\Users\Administrator\Desktop\speedo.pwn(99) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\speedo.pwn(99) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\speedo.pwn(99) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\speedo.pwn(99) : fatal error 107: too many error messages on one line -
Also mach mal das
Difene Farben
#define OBJECTIVE_COLOR 0x64000064
#define TEAM_GREEN_COLOR 0xFFFFFFAA
#define TEAM_JOB_COLOR 0xFFB6C1AA
#define TEAM_HIT_COLOR 0xFFFFFF00
#define TEAM_BLUE_COLOR 0x8D8DFF00
#define TEAM_RADIO_COLOR 0xF2D068FF
#define COLOR_ADD 0x63FF60AA
#define TEAM_GROVE_COLOR 0x00D900C8
#define TEAM_VAGOS_COLOR 0xFFC801C8
#define TEAM_BALLAS_COLOR 0xD900D3C8
#define TEAM_AZTECAS_COLOR 0x01FCFFC8
#define TEAM_CYAN_COLOR 0xFF8282AA
#define TEAM_ORANGE_COLOR 0xFF830000
#define TEAM_COR_COLOR 0x39393900
#define TEAM_BAR_COLOR 0x00D90000
#define TEAM_TAT_COLOR 0xBDCB9200
#define TEAM_CUN_COLOR 0xD900D300
#define TEAM_STR_COLOR 0x01FCFF00
#define TEAM_ADMIN_COLOR 0x00808000
So das mmuss unter public SetPlayerToTeamColor(playerid)
So nun nimmst du dir eine farbe und setzt das so ein wie oben hir ein bsp:else if (PlayerInfo[playerid][pMember] == farktions ID|| PlayerInfo[playerid][pLeader] == farktions ID)
{
SetPlayerColor(playerid,farbcod oder difine farbe);//farbcode= 0x01FCFF00 oder difine farbe von oben nehmen:TEAM_ADMIN_COLOR
} -
So habe prob mit error
so hir is das script:
#include <a_samp>
#define SLOTS 200
#define GasMax 100forward CheckGas();
enum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}new SavePlayerPos[SLOTS][SavePlayerPosEnum];
new Text:Speedo[SLOTS];
new UpdateSeconds;
new Gas[MAX_VEHICLES],vehicle;
new CarName[][] =
{
"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", "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"
};forward UpdateSpeed();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("----------------------------------------");
print("--------------------------------------\n");
SetTimer("UpdateSpeed",1000, 1);
return 1;
}public OnFilterScriptExit()
{
return 1;
}main()
{
}public OnPlayerConnect(playerid)
{
return 1;
}public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid, Speedo[playerid]);
}
return 1;
}public UpdateSpeed()
{
new Float:x,Float:y,Float:z;
new Float:distance,value,string[256];
new Float:health;
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
TextDrawDestroy(Speedo[i]);
}
}for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
GetVehicleGas(GetPlayerVehicleID(i), Gas);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~ ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f ~n~ ~p~ Tank:~w~ %d%",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1000),health,Gas[vehicle]);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
}und hir der error
C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(114) : error 017: undefined symbol "GetVehicleGas"
ich bitte um hilfe -
#include <a_samp>
#define SLOTS 200
#define GasMax 100forward CheckGas();
enum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}new SavePlayerPos[SLOTS][SavePlayerPosEnum];
new Text:Speedo[SLOTS];
new UpdateSeconds;
new Gas[MAX_VEHICLES],vehicle;
new CarName[][] =
{
"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", "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"
};forward UpdateSpeed();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("----------------------------------------");
print("--------------------------------------\n");
SetTimer("UpdateSpeed",1000, 1);
return 1;
}public OnFilterScriptExit()
{
return 1;
}main()
{
}public OnPlayerConnect(playerid)
{
return 1;
}public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid, Speedo[playerid]);
}
return 1;
}public UpdateSpeed()
{
new Float:x,Float:y,Float:z;
new Float:distance,value,string[256];
new Float:health;
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
TextDrawDestroy(Speedo[i]);
}
}for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~ ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f ~n~ ~p~ Tank:~w~ %d%",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1000),health,Gas[vehicle]);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
}bitte schen
-
So mein tacho zeig bei tank immer 0% an obwohl
der tank voll ist was soll ich nun machen? -
Kann mir wer in das Speedo eine Tankanzeige rein bauen
so hir ist das speedo script
#include <a_samp>
#define SLOTS 200
#define GasMax 100enum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}new SavePlayerPos[SLOTS][SavePlayerPosEnum];
new Text:Speedo[SLOTS];
new UpdateSeconds;
new CarName[][] =
{
"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", "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"
};forward UpdateSpeed();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("----------------------------------------");
print("--------------------------------------\n");
SetTimer("UpdateSpeed",1000, 1);
return 1;
}public OnFilterScriptExit()
{
return 1;
}main()
{
}public OnPlayerConnect(playerid)
{
return 1;
}public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid, Speedo[playerid]);
}
return 1;
}public UpdateSpeed()
{
new Float:x,Float:y,Float:z;
new Float:distance,value,string[256];
new Float:health;
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
TextDrawDestroy(Speedo[i]);
}
}for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~ ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f %",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1000),health);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
} -
So ichs noch ein bissel verändert und habe widda ein fehler
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~ ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f ~n~ ~p~ Tank: ~w~%s %",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1000),health,Gas[GetVehicleGas]);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
}C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(119) : error 017: undefined symbol "GetVehicleGas"
-
si jezt habe ich nur noch den error hir :
C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(120) : error 017: undefined symbol "vehicle"
-
Gas[vehicle] bringt er mir folgende fehlermeldung
C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(120) : error 017: undefined symbol "Gas"
C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(120) : error 017: undefined symbol "vehicle"
C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(120) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\GTA_SA_MP\filterscripts\speedo.pwn(120) : fatal error 107: too many error messages on one linedas is die stelle wo es gebraucht wird
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~ ~b~KM/H : ~w~%d ~n~~r~Vehicle Health:~w~ %.2f ~n~ ~p~ Tank:~w~ %",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1000),health,Gas[vehicle]);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
}was soll ich nu machen
-
Wie grige ich hir noch eine tankanzeige rein?
#include <a_samp>#define SLOTS 200
#define GasMax 100enum SavePlayerPosEnum {
Float:LastX,
Float:LastY,
Float:LastZ
}new SavePlayerPos[SLOTS][SavePlayerPosEnum];
new Text:Speedo[SLOTS];
new UpdateSeconds;new CarName[][] =
{
"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", "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"
};forward UpdateSpeed();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("----------------------------------------");
print("--------------------------------------\n");
SetTimer("UpdateSpeed",1000, 1);
return 1;
}public OnFilterScriptExit()
{
return 1;
}main()
{
}public OnPlayerConnect(playerid)
{
return 1;
}public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid, Speedo[playerid]);
}
return 1;
}public UpdateSpeed()
{
new Float:x,Float:y,Float:z;
new Float:distance,value,string[256];
new Float:health;
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
TextDrawDestroy(Speedo[i]);
}
}for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, x, y, z);
GetVehicleHealth(GetPlayerVehicleID(i), health);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
value = floatround(distance * 5000);
if(UpdateSeconds > 1)
{
value = floatround(value / UpdateSeconds);
}
format(string,sizeof(string),"~g~Vehicle : ~w~%s ~n~~b~MPH : ~w~%d / ~b~KM/H : ~w~%d~n~~y~Altitude:~w~ %.1f ~n~~r~Vehicle Health:~w~ %.2f ~n~ ~p~ Tank:~w~ %",CarName[GetVehicleModel(GetPlayerVehicleID(i))-400],floatround(value/1600),floatround(value/1000),z,health);
Speedo[i] = TextDrawCreate(320.00, 380.00, string);
TextDrawSetOutline(Speedo[i], 0);
TextDrawFont(Speedo[i], 3);
TextDrawSetProportional(Speedo[i], 2);
TextDrawAlignment(Speedo[i], 2);
TextDrawShowForPlayer (i, Speedo[i]);
}
SavePlayerPos[i][LastX] = x;
SavePlayerPos[i][LastY] = y;
SavePlayerPos[i][LastZ] = z;
}
} -
geht nit das soll für nobbs sein das die glei los fahren könne
-
wie mache ich das man manche cars ohne Führerschein fahren kann
ich bitte um hilfe