//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 ,"Vehicle: %s\nHealth: %.2f\nSpeed: %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;
}
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
Originally Posted by ◄•CJ101•►
Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid)) |
Originally Posted by [SU
propilot ]
Quote:
|
if(IsPlayerConnected(wplayerid) && !IsPlayerNPC(wplayerid))
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
Originally Posted by ◄•CJ101•►
Quote:
Код:
if(IsPlayerConnected(wplayerid) && !IsPlayerNPC(wplayerid)) Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid)) |
make sure you also change Stat with whever you store the account stats |
C:\Documents and Settings\Administrator\Desktop\[BACKUP]\filterscripts\copspeedo.pwn(56) : error 017: undefined symbol "Stat" C:\Documents and Settings\Administrator\Desktop\[BACKUP]\filterscripts\copspeedo.pwn(56) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\[BACKUP]\filterscripts\copspeedo.pwn(56) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Administrator\Desktop\[BACKUP]\filterscripts\copspeedo.pwn(56) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\[BACKUP]\filterscripts\copspeedo.pwn(56) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Originally Posted by [SU
propilot ]
help? it reallly importent?! |
Originally Posted by Miokie*
Quote:
|
Originally Posted by [SU
propilot ]
Quote:
|
Originally Posted by Miokie*
Quote:
|
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1) { SendClientMessage(playerid, COLOR_WHITE, "[Police:] /policecmds"); }