Need really easy help! ( I think xD )
#1

Hey I am tryign to make this

pawn Код:
//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;
}
Make it visible only to cops! The team id is 0
and the cmd to turn it on would ob
/raderon
and to turn it off
/raderoff
thanks!
Reply
#2


Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
??
Reply
#3

Quote:
Originally Posted by ◄•CJ101•►
Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
??
what do you mean?
Reply
#4

Quote:
Originally Posted by [SU
propilot ]
Quote:
Originally Posted by ◄•CJ101•►
Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
??
what do you mean?
Change this :

Код:
if(IsPlayerConnected(wplayerid) && !IsPlayerNPC(wplayerid))
to:

Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
make sure you also change Stat with whever you store the account stats
Reply
#5

Quote:
Originally Posted by ◄•CJ101•►
Quote:
Originally Posted by [SU
propilot ]
Quote:
Originally Posted by ◄•CJ101•►
Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
??
what do you mean?
Change this :

Код:
if(IsPlayerConnected(wplayerid) && !IsPlayerNPC(wplayerid))
to:

Код:
if(IsPlayerConnected(wplayerid) && Stat[wplayerid][Team] == 0 && !IsPlayerNPC(wplayerid))
make sure you also change Stat with whever you store the account stats
okay
and what do you mean by that?
Quote:

make sure you also change Stat with whever you store the account stats
and how do i make a CMD?

ERRORS:
by doing what you told [editing the line]

Код:
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.
Reply
#6

help?
it reallly importent?!
Reply
#7

Quote:
Originally Posted by [SU
propilot ]
help?
it reallly importent?!
What are you using to track a players team?
Reply
#8

Quote:
Originally Posted by Miokie*
Quote:
Originally Posted by [SU
propilot ]
help?
it reallly importent?!
What are you using to track a players team?
What do you mean?
Reply
#9

Quote:
Originally Posted by [SU
propilot ]
Quote:
Originally Posted by Miokie*
Quote:
Originally Posted by [SU
propilot ]
help?
it reallly importent?!
What are you using to track a players team?
What do you mean?
are you using gTeam or SetPlayerTeam... ?
Reply
#10

Quote:
Originally Posted by Miokie*
Quote:
Originally Posted by [SU
propilot ]
Quote:
Originally Posted by Miokie*
Quote:
Originally Posted by [SU
propilot ]
help?
it reallly importent?!
What are you using to track a players team?
What do you mean?
are you using gTeam or SetPlayerTeam... ?
Код:
	if(DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
			{
	 			SendClientMessage(playerid, COLOR_WHITE, "[Police:] /policecmds");
			}
EDIT:
BTW I am not adding it to my gamemode!
I am using it as an FS!
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)