[POMOC] 3D Speedo se ne pomijera

Započeo MaX91, Maj 16, 2011, 19:11:38 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Mod od 0.
Detaljan opis problema: Skinuo sam FilterScriptu te preveo, ubacim u gamemod sve jasno, i uÄ'em u igricu, uÄ'em u kamion, vidim ono Å¡to sam napravio, tj. da mi pokaže koliko vozim KM/H, kao i da policajac vidi. To je na sredini automobila, ili zadnjem dijelu kamiona. I sada, vozim ja, kad ono KM/H: 82, i neće dalje da se pomijera kada vozim, ili kada se za ustavim.
Dio skripte: //Speedometer v1.2 by: Phento  Samp0.3

#include <a_samp>

#define speedcolor 0x008080FF

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" };

new
PlayerText3D:speedo3Dtext,
Speedoff,
bool:OneCreateTextDraw[MAX_PLAYERS];

public OnFilterScriptInit()
{
print("speedo loaded");
Speedoff = SetTimer("Speed", 800, 1);
return 1;
}

public OnPlayerConnect(playerid)
{
OneCreateTextDraw[playerid] = true;
return 1;
}

forward Speed();
public Speed()
{
new
wplayerid = 0,
GetPlayers = GetMaxPlayers();

while(wplayerid != GetPlayers)
{
if(IsPlayerConnected(wplayerid) && !IsPlayerNPC(wplayerid))
{
    new
string[128],
VehicleID = GetPlayerVehicleID(wplayerid);
//         printf("Connected wplayerid and No Npc ID: %d", wplayerid);
if(VehicleID)
{
        new
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 ,"\nKM/H: %ikm/h", VehicleName[GetVehicleModel(VehicleID)-400], vhealth, floatround(PointToPoint, floatround_floor));
if(OneCreateTextDraw[wplayerid] == true)
{
//     printf("Create speedo3Dtext wplayerid: %d", wplayerid);
speedo3Dtext = CreatePlayer3DTextLabel(wplayerid, string, speedcolor, 0.0,-1.6,-0.35,20.0, INVALID_PLAYER_ID, VehicleID);
OneCreateTextDraw[wplayerid] = false;
}
    UpdatePlayer3DTextLabelText(wplayerid, speedo3Dtext, speedcolor, string);
} else if(wplayerid) {
    if(OneCreateTextDraw[wplayerid] == false)
    {
//     format(string,sizeof string," ");
//     UpdatePlayer3DTextLabelText(p,speedo3Dtext, speedcolor, string);
//             printf("Delete speedo3Dtext wplayerid: %d", wplayerid);
DeletePlayer3DTextLabel(wplayerid, speedo3Dtext);
        OneCreateTextDraw[wplayerid] = true;
}
}
}
wplayerid++;
}
return 1;
}

public OnFilterScriptExit()
{
KillTimer(Speedoff);
for(new forplayerid; forplayerid < MAX_PLAYERS; forplayerid++)
{
DeletePlayer3DTextLabel(forplayerid, speedo3Dtext);
}
return 1;
}
- To je cijela FS.
Neke slike/video za lakse dobivanje pomoci(neobavezno): /