Jump to content

Jak na Tachometr


Guest Mort

Recommended Posts

format(s,sizeof(s),"%d",rychlost);

 

SetPlayerMapIcon(playerid, 1, -1519.3204,2610.3164,55.8359, 52, MAPICON_LOCAL);

 

 

dík,jsem si nevšiml vůbec :d koupím si brejle :d

C:\Users\moje\Desktop\samp03\pawno\include\apache.inc(41) : warning 219: local variable "s" shadows a variable at a preceding level

C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(494) : error 035: argument type mismatch (argument 1)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

 

řádek 1. warování 34-55

main()
{
print("\n----------------------------------");
print(" Země Rváčů LVD ");
print("----------------------------------\n");
}
enum SPS
{
   Float:X_r,
   Float:Y_r,
   Float:Z_r
}
stock GetPlayerSpeed(playerid,bool:kmh) // by misko
{
 	new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
 	if(IsPlayerInAnyVehicle(playerid))
 	GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
 	else
 	GetPlayerVelocity(playerid,Vx,Vy,Vz);
 	rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
 	return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}

 

2.error 492-502

public OnPlayerConnect(playerid)
{
   TextDrawSetString(Textdraw, string);
   SetPlayerMapIcon(playerid, 1, -1519.3204,2610.3164,55.8359, 52, 0, MAPICON_LOCAL);
   SetPlayerMapIcon(playerid, 2, -243.3448,2710.1506,62.6875, 52, 0, MAPICON_LOCAL);
   SetPlayerMapIcon(playerid, 3, 2193.4268,2002.1923,12.2894, 52, 0, MAPICON_LOCAL);
   bank[playerid] = dUserINT(PlayerName(playerid)).("banka");
	numbera[playerid] = 0;
Hentum[playerid] = 0;
Label[playerid] = Create3DTextLabel("",0,30.0,40.0,50.0,70.0,0,1);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.4);

Link to comment
Share on other sites

public OnPlayerConnect(playerid)
{
   TextDrawSetString(Textdraw, string);
   SetPlayerMapIcon(playerid, 1, -1519.3204,2610.3164,55.8359, 52, 0, MAPICON_LOCAL);
   SetPlayerMapIcon(playerid, 2, -243.3448,2710.1506,62.6875, 52, 0, MAPICON_LOCAL);
   SetPlayerMapIcon(playerid, 3, 2193.4268,2002.1923,12.2894, 52, 0, MAPICON_LOCAL);

 

ty nuly znamenají co ? :eh:

 

enum SPS

{

Float:X_r,

Float:Y_r,

Float:Z_r

};

Link to comment
Share on other sites

ty nuly jsou barva,když to vymažu tak mě to hodí error !!

 

 

tohle mi zase hlásí

C:\Users\moje\Desktop\samp03\pawno\include\apache.inc(41) : warning 219: local variable "s" shadows a variable at a preceding level

C:\Users\moje\Desktop\samp03\pawno\prdel.pwn(494) : error 035: argument type mismatch (argument 1)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

 

1. varování 34-45

main()
{
print("\n----------------------------------");
print(" Země Rváčů LVD ");
print("----------------------------------\n");
}
enum SPS
{
   Float:X_r,
   Float:Y_r,
   Float:Z_r,
};

 

2. error 492-502

public OnPlayerConnect(playerid)
{
   TextDrawSetString(Textdraw, string);
   SetPlayerMapIcon(playerid, 1, -1519.3204,2610.3164,55.8359, 52, 0, MAPICON_LOCAL);
   SetPlayerMapIcon(playerid, 2, -243.3448,2710.1506,62.6875, 52, 0, MAPICON_LOCAL);
   SetPlayerMapIcon(playerid, 3, 2193.4268,2002.1923,12.2894, 52, 0, MAPICON_LOCAL);
   bank[playerid] = dUserINT(PlayerName(playerid)).("banka");
	numbera[playerid] = 0;
Hentum[playerid] = 0;
Label[playerid] = Create3DTextLabel("",0,30.0,40.0,50.0,70.0,0,1);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.4);

tenhle to chce vyřeší spíš ne ??

Link to comment
Share on other sites

  • 5 months later...

No bez ní by mi asi tachometr vůbec nešel :d, mám to udělané jako to je v tutorialu. Tachometr funguje jako jo, nastoupim ukáže se 0 km/h, jedu jedu na max (víc ten infernus asi nedokáže) a je tam cca 200 km/h (192-197 někdy 200) pak zatočím a najednou jedu 300km/h.. za chvíli zase tak 150-200 někdy i pod 100 :/

Link to comment
Share on other sites

  • 5 weeks later...
Trošku starší, ale:

	new rychlost[20];
	format(rychlost, sizeof(rychlost), "Rychlost: %d KM/H", GetPlayerSpeed(i,true);
	TextDrawSetString(textdrawX[i], rychlost);

error 001: expected token: ",", but found ";"

 

Nikde mi ale čárka ne¨chybí, neé?

 

format(rychlost, sizeof(rychlost), "Rychlost: %d KM/H", GetPlayerSpeed(i,true));

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...