2-Tem Como medir distancia em KM que carro percorre exemplo um velocimetro que mostra kms rodados
|
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
// Contйudo.
}
return 1;
}
1- Como fazo pra quando cara entra no carro aparece camera que mostra dentro do carro que nem camhack?
2-Tem Como medir distancia em KM que carro percorre exemplo um velocimetro que mostra kms rodados 3-Como Posso Fazer sistema de Tatuagem? |
new MeuKM[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
MeuKM[playerid]++;
}
return 1;
}
// COMANDO
if(!strcmp(cmdtext,"/rdei", true))
{
new str[100]; format(str, sizeof(str),"Vocк rodou %d kilфmetros.", MeuKM[playerid]);
return 1;
}
2:
pawn Код:
|
if(!strcmp(cmdtext,"/rdei", true))
{
new str[100]; format(str, sizeof(str),"Vocк rodou %d kilфmetros.", MeuKM[playerid]); SendClientMessage(playerid, -1, str);
return 1;
}
new MeuKM[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
MeuKM[playerid]++;
}
return 1;
}
// COMANDO
if(!strcmp(cmdtext,"/rdei", true))
{
new str[100]; format(str, sizeof(str),"Vocк rodou %d kilфmetros.", MeuKM[playerid]);
return SendClientMessage(playerid, -1, str);
}
new MeuKM[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
MeuKM[playerid]++;
}
return 1;
}
new MeuKM[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
static Float:x, Float:y, Float:z;
if(IsPlayerInRangeOfPoint(playerid, 100.0, x,y,z))
else return GetPlayerPos(playerid, x,y,z);
GetPlayerPos(playerid, x,y,z);
MeuKM[playerid]++;
}
return 1;
}
//Topo do gmfs coloque.
static Float:poskm [3];
//Fim do gm/fs coloque
stock GetSpeed ( playerid , mode = 1 )
{
GetVehicleVelocity ( GetPlayerVehicleID ( playerid ) , poskm [ 0 ] , poskm [ 1 ] , poskm [ 2 ] ) ;
return IsPlayerInAnyVehicle ( playerid ) ? floatround ( ( ( floatsqroot ( ( ( poskm [ 0 ] * poskm [ 0 ] ) + ( poskm [ 1 ] * poskm [ 1 ] ) + ( poskm [ 2 ] * poskm [ 2 ] ) ) ) * ( !mode ? 105.0 : 170.0 ) ) ) * 1 ) : 0;
}
Speed(playerid);
public Speed(playerid)
{
new MySpeed[48];
new MyCar[48];
format(MySpeed,sizeof(MySpeed),"Velocidade: %d Km/h",GetSpeed(playerid));
format(MyCar,sizeof(MyCar),"Veiculo: %s",veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
TextDrawSetString(Textdraw0, MySpeed);
TextDrawSetString(Textdraw4, MyCar);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
SetTimerEx("Speed",1,0,"i",playerid);
}