[AYUDA] Alguen Me Ayudaria A Hacer Esto?
#1

Buenas loque pasa esque estoy buscando alguen que sepa, y me pueda ayudar a pasar unos textdraws, cambiarlos de lugar, psarlos encima del minimapa: (IMAGEN)



Pero Esque Yo No Se hacerlo, Entonces, Alguen Me Podria Ayudar?

Gracias Desde Ya.
Reply
#2

busca zamaroth textdraw y ahi puedes editarlo y ponerlo como quieras
Reply
#3

Amigo ahi un FS llamado, Zamaroth Textdraw Editor, Con ese FS puedes crear tus propios TextDraw o sacar las coordenadas y cambiarlas por el que quieres mover, Tambiйn ahн otros editores como este, iPLEOMAX's TextDraw Editor, usa el que mas te guste para editar/crear tus propios textdraw,te recuerdo que el Zamaroth, Esta en espaсol, iPLEOMAX's, No lo esta solamente en ingles, pero vos fнjate cual guste.
saludos.
Reply
#4


pawn Код:
Textdraw0 = TextDrawCreate(34.000000, 221.000000, "~r~puntos drift~n~~w~150~n~~r~bonus~n~~w~x1~n~~r~dinero~n~~w~45");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 2);
TextDrawLetterSize(Textdraw0, 0.359999, 2.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, 0);
Reply
#5

Quote:
Originally Posted by OTACON
Посмотреть сообщение

pawn Код:
Textdraw0 = TextDrawCreate(34.000000, 221.000000, "~r~puntos drift~n~~w~150~n~~r~bonus~n~~w~x1~n~~r~dinero~n~~w~45");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 2);
TextDrawLetterSize(Textdraw0, 0.359999, 2.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, 0);
Hay Esta El Problema
El FS, Que Tengo Es Muy Distinto

No Es Asi Como Melo Pasaste

Alguen OTACON Telo Paso Por MP, Y Melo haces ? Please, Esque Es Muy Raro No Lo Entiendo...
Reply
#6

Quote:
Originally Posted by yesid001
Посмотреть сообщение
Hay Esta El Problema
El FS, Que Tengo Es Muy Distinto

No Es Asi Como Melo Pasaste

Alguen OTACON Telo Paso Por MP, Y Melo haces ? Please, Esque Es Muy Raro No Lo Entiendo...
Es eso lo que buscas solo que otacon te paso, el textdraw movido, mira hace esto pone todo el codigo del FS, y te lo acomodo como quieres, saludos.
Reply
#7

Ok, Miren Aca Esta El Fs:
PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
#endif
#define DRIFT_MINKAT 10.0
#define DRIFT_MAXKAT 90.0
#define DRIFT_SPEED 30.0
///////////////////
#define COLOR_Label 0xFF0000FF//#define COLOR_Label 0xFFFFFFFF
#define COLOR_LabelOut 0x00000040//#define COLOR_LabelOut 0x00000040
#define COLOR_ValueOut 0x00000040//#define COLOR_ValueOut 0xFFFFFF40
#define COLOR_Value 0xFFFFFFFF//rojo//#define COLOR_Value 0x000000FF
#define Label_X 500
#define Value_X 500
#define TD_Y 100
/////////////////////////////////////
new DriftTimer[MAX_PLAYERS];
new 
TimerA,TimerB,TimerC;
new 
DriftPointsNow[MAX_PLAYERS];
new 
PlayerDriftCancellation[MAX_PLAYERS];
new 
Float:ppos[MAX_PLAYERS][3];
enum Float:PosFloat:sX,Float:sY,Float:sZ };
new 
Float:SavedPos[MAX_PLAYERS][Pos];
new 
bool:DriftMode[MAX_PLAYERS]=false;
new 
DriftBonus[MAX_PLAYERS]=1;
new 
Float:HealthInit[MAX_PLAYERS]=1000.0;
new 
bool:AutoFixBool[MAX_PLAYERS]=true;
new 
Text:TDLabels[3];
new 
Text:TDValueDrift[MAX_PLAYERS];
new 
Text:TDValueBonus[MAX_PLAYERS];
new 
Text:TDValueCash[MAX_PLAYERS];
forward Drift();
forward AngleUpdate();
forward DriftExit(playerid);
forward CheckPlayerState();
forward AutoFix();
public 
OnFilterScriptInit(){
        
TimerA=SetTimer("AngleUpdate"200true);
        
TimerB=SetTimer("AutoFix"500true);
        
TimerC=SetTimer("CheckPlayerState"100true);
        
LoadTextDraws();
        return 
1;
}
public 
OnFilterScriptExit(){
    
KillTimer(TimerA);
    
KillTimer(TimerB);
    
KillTimer(TimerC);
    return 
1;
}
Float:GetPlayerTheoreticAngle(i)
{
// y = vertical = |
// x = horizontal = -
        
new Float:sin;
        new 
Float:dis;
        new 
Float:angle2;
        new 
Float:x,Float:y,Float:z;
        new 
Float:tmp3;
        new 
Float:tmp4;
        new 
Float:MindAngle;
        if(
IsPlayerConnected(i)){
                
GetPlayerPos(i,x,y,z);
                
dis floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));
                if(
IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(iangle2);}
                if(
x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
                if(
y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}
                if(
ppos[i][1]>&& ppos[i][0]>x){
                    
sin asin(tmp3/dis);
                    
MindAngle floatsub(floatsub(floatadd(sin90), floatmul(sin2)), -90.0);//   MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
                
}
                if(
ppos[i][1]<&& ppos[i][0]>x){
                    
sin asin(tmp3/dis);
                    
MindAngle floatsub(floatadd(sin180), 180.0);//MindAngle = floatsub(floatadd(sin, 180), 180.0);
                
}
                if(
ppos[i][1]<&& ppos[i][0]<x){
                    
sin acos(tmp4/dis);
                    
MindAngle floatsub(floatadd(sin360), floatmul(sin2));//MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
                
}
                if(
ppos[i][1]>&& ppos[i][0]<x){
                    
sin asin(tmp3/dis);
                    
MindAngle floatadd(sin180);//MindAngle = floatadd(sin, 180);
                
}
        }
        if(
MindAngle == 0.0){return angle2;}else{return MindAngle;}
}
public 
DriftExit(playerid){
        
PlayerDriftCancellation[playerid] = 0;
         
/////////////////////////////////////
        
new Float:h;
        
GetVehicleHealth(GetPlayerVehicleID(playerid),h);
        if(
DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]);
        
TextDrawHideForPlayer(playerid,TDLabels[0]);
        
TextDrawHideForPlayer(playerid,TDLabels[1]);
        
TextDrawHideForPlayer(playerid,TDLabels[2]);
        
TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
        
TextDrawHideForPlayer(playerid,TDValueBonus[playerid]);
        
TextDrawHideForPlayer(playerid,TDValueCash[playerid]);
        
DriftBonus[playerid]=1;
        
AutoFixBool[playerid]=true;
        
SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
        
////////////////////////////////////////////////////
        
DriftPointsNow[playerid] = 0;
}
Float:ReturnPlayerAngle(playerid){
        new 
Float:Ang;
        if(
IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playeridAng);
        return 
Ang;
}
public 
Drift(){
        new 
Float:Angle1Float:Angle2Float:BySpeed;
        new 
Float:Z;
        new 
Float:X;
        new 
Float:Y;
        new 
Float:SpeedX;
        for(new 
g=0;g<200;g++){
                
GetPlayerPos(gXYZ);
                
SpeedX floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos][ sZ ])),2)));
                
Angle1 ReturnPlayerAngle(g);
                
Angle2 GetPlayerTheoreticAngle(g);
                
BySpeed floatmul(SpeedX12);
                if(
IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1Angle2)) < DRIFT_MAXKAT && BySpeed DRIFT_SPEED){
                        if(
PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
                        
PlayerDriftCancellation[g] = 0;
                        
DriftPointsNow[g] += floatvalfloatabs(floatsub(Angle1Angle2)) * * (BySpeed*0.1) )/10;
                        
PlayerDriftCancellation[g] = SetTimerEx("DriftExit"30000"d"g);
                }
                if(
DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){
                    
/////////////////////////////////
                    
if(DriftPointsNow[g]<500){
                        
DriftBonus[g]=1;
                    }
                    if(
DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000){
                        
DriftBonus[g]=2;
                    }
                    if(
DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700){
                        
DriftBonus[g]=3;
                    }
                    if(
DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500){
                        
DriftBonus[g]=4;
                    }
                    if(
DriftPointsNow[g]>=2500){
                        
DriftBonus[g]=5;
                    }
                    
TextDrawShowForPlayer(g,TDLabels[0]);
                    
TextDrawShowForPlayer(g,TDLabels[1]);
                    
TextDrawShowForPlayer(g,TDLabels[2]);
                    
TextDrawShowForPlayer(g,TDValueDrift[g]);
                    
TextDrawShowForPlayer(g,TDValueBonus[g]);
                    
TextDrawShowForPlayer(g,TDValueCash[g]);
                    new 
DPs[128],DBn[128],Cash[128],csh;
                    
valstr(DPs,DriftPointsNow[g],false);
                    
format(DBn,sizeof(DBn),"X%i",DriftBonus[g]);
                    
csh=DriftPointsNow[g]*DriftBonus[g];
                    
format(Cash,sizeof(Cash),"$%i",csh);
                    
TextDrawSetString(TDValueDrift[g],DPs);
                    
TextDrawSetString(TDValueBonus[g],DBn);
                    
TextDrawSetString(TDValueCash[g],Cash);
                    
////////////////////////////////////////
                
}
                
SavedPos][ sX ] = X;
                
SavedPos][ sY ] = Y;
                
SavedPos][ sZ ] = Z;
        }
}
public 
AngleUpdate() {
        for(new 
g=0;g<=MAX_PLAYERS;g++){
                new 
Float:xFloat:yFloat:z;
                if(
IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), xyz); else GetPlayerPos(gxyz);
                
ppos[g][0] = x;
                
ppos[g][1] = y;
                
ppos[g][2] = z;
        }
}
floatval(Float:val){
        new 
str[256];
        
format(str256"%.0f"val);
        return 
todec(str);
}
todec(str[]){
        return 
strval(str);
}
LoadTextDraws(){
    
TDLabels[0]=TextDrawCreate(Label_X,TD_Y,"Drift (Derrape)");
    
TextDrawColor(TDLabels[0],COLOR_Label);
    
TextDrawSetShadow(TDLabels[0],0);
    
TextDrawSetOutline(TDLabels[0],1);
    
TextDrawLetterSize(TDLabels[0],0.5,2);
    
TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut);
    
TextDrawFont(TDLabels[0],1);
    
TDLabels[1]=TextDrawCreate(Label_X,TD_Y+50,"Bonus");
    
TextDrawColor(TDLabels[1],COLOR_Label);
    
TextDrawSetShadow(TDLabels[1],0);
    
TextDrawSetOutline(TDLabels[1],1);
    
TextDrawLetterSize(TDLabels[1],0.5,2);
    
TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut);
    
TextDrawFont(TDLabels[1],1);
    
TDLabels[2]=TextDrawCreate(Label_X,TD_Y+100,"Dinero");
    
TextDrawColor(TDLabels[2],COLOR_Label);
    
TextDrawSetShadow(TDLabels[2],0);
    
TextDrawSetOutline(TDLabels[2],1);
    
TextDrawLetterSize(TDLabels[2],0.5,2);
    
TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut);
    
TextDrawFont(TDLabels[2],1);
    new 
i;
    for(
i=0;i<=MAX_PLAYERS;i++){
        
TDValueDrift[i]=TextDrawCreate(Value_X,TD_Y+20,"0");
        
TextDrawColor(TDValueDrift[i],COLOR_Value);
        
TextDrawSetShadow(TDValueDrift[i],0);
        
TextDrawSetOutline(TDValueDrift[i],1);
        
TextDrawLetterSize(TDValueDrift[i],0.5,2);
        
TextDrawBackgroundColor(TDValueDrift[i],COLOR_ValueOut);
        
TextDrawFont(TDValueDrift[i],3);
        
TDValueBonus[i]=TextDrawCreate(Value_X,TD_Y+70,"X1");
        
TextDrawColor(TDValueBonus[i],COLOR_Value);
        
TextDrawSetShadow(TDValueBonus[i],0);
        
TextDrawSetOutline(TDValueBonus[i],1);
        
TextDrawLetterSize(TDValueBonus[i],0.5,2);
        
TextDrawBackgroundColor(TDValueBonus[i],COLOR_ValueOut);
        
TextDrawFont(TDValueBonus[i],3);
        
TDValueCash[i]=TextDrawCreate(Value_X,TD_Y+100,"$0");
        
TextDrawColor(TDValueCash[i],COLOR_Value);
        
TextDrawSetShadow(TDValueCash[i],0);
        
TextDrawSetOutline(TDValueCash[i],1);
        
TextDrawLetterSize(TDValueCash[i],0.5,2);
        
TextDrawBackgroundColor(TDValueCash[i],COLOR_ValueOut);
        
TextDrawFont(TDValueCash[i],3);
    }
    return 
1;
}
public 
CheckPlayerState(){
    new 
i,cs;
    for(
i=0;i<=MAX_PLAYERS;i++){
        
cs=GetPlayerState(i);
        if(
DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>70){
            new 
Float:h;
            
GetVehicleHealth(GetPlayerVehicleID(i),h);
            if(
h<HealthInit[i]){
                
KillTimer(DriftTimer[i]);
                
DriftExit(i);
                
DriftMode[i]=false;
            }
        }
        if(
cs==PLAYER_STATE_DRIVER && DriftMode[i]==false){
            if(
GetVType(GetPlayerVehicleID(i))){
                
DriftMode[i]=true;
                
GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
                
DriftTimer[i]=SetTimerEx("Drift"200true"i"i);
            }
        }
        else if(
cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true){
            
KillTimer(DriftTimer[i]);
            
DriftMode[i]=false;
        }
        else{}
    }
    return 
1;
}
public 
AutoFix(){
    new 
i;
    for(
i=0;i<=MAX_PLAYERS;i++){
        if(
AutoFixBool[i] && IsPlayerInAnyVehicle(i)){
            
SetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
        }
    }
}
GetVType(vid){
    new 
Convertibles[4]={480533439555};
    new 
Industrial[26]={499422482498609524578455403414582443514413515440543605459531408552478456554};
    new 
LowRider[8]={536575534567535566576412};
    new 
OffRoad[13]={568424573579400500444556557470489505595};
    new 
Service[19]={416433431438437523427490528407544596596597598599432601420};
    new 
Saloon[35]={445504401518527542507562585419526604466492474546517410551516467600426436547405580560550549540491529421};
    new 
Sports[20]={602429496402541415589587565494502503411559603475506451558477};
    new 
Wagons[5]={418404479458561};
    new 
modelid=GetVehicleModel(vid);
    new 
i;
    for(
i=0;i<3;i++){
            if(
Convertibles[i]==modelid) return 1;
    }
    for(
i=0;i<25;i++){
            if(
Industrial[i]==modelid) return 1;
    }
    for(
i=0;i<7;i++){
            if(
LowRider[i]==modelid) return 1;
    }
    for(
i=0;i<12;i++){
            if(
OffRoad[i]==modelid) return 1;
    }
    for(
i=0;i<19;i++){
            if(
Service[i]==modelid) return 1;
    }
    for(
i=0;i<35;i++){
            if(
Saloon[i]==modelid) return 1;
    }
    for(
i=0;i<20;i++){
            if(
Sports[i]==modelid) return 1;
    }
    for(
i=0;i<5;i++){
            if(
Wagons[i]==modelid) return 1;
    }
    return 
0;

Y Aqui Las Coordenadas Que Saque Con Zmamaroth (o como se escriba xD)

PHP код:
Textdraw0 TextDrawCreate(16.000000265.000000"Drift:");
Textdraw1 TextDrawCreate(58.000000255.000000"150");
Textdraw2 TextDrawCreate(16.000000298.000000"Bonus:");
Textdraw3 TextDrawCreate(70.000000298.000000"x1");
Textdraw4 TextDrawCreate(15.000000324.000000"Dinero:");
Textdraw5 TextDrawCreate(75.000000324.000000"$150"); 
Reply
#8

Quote:
Originally Posted by yesid001
Посмотреть сообщение
Ok, Miren Aca Esta El Fs:
PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
#endif
#define DRIFT_MINKAT 10.0
#define DRIFT_MAXKAT 90.0
#define DRIFT_SPEED 30.0
///////////////////
#define COLOR_Label 0xFF0000FF//#define COLOR_Label 0xFFFFFFFF
#define COLOR_LabelOut 0x00000040//#define COLOR_LabelOut 0x00000040
#define COLOR_ValueOut 0x00000040//#define COLOR_ValueOut 0xFFFFFF40
#define COLOR_Value 0xFFFFFFFF//rojo//#define COLOR_Value 0x000000FF
#define Label_X 500
#define Value_X 500
#define TD_Y 100
/////////////////////////////////////
new DriftTimer[MAX_PLAYERS];
new 
TimerA,TimerB,TimerC;
new 
DriftPointsNow[MAX_PLAYERS];
new 
PlayerDriftCancellation[MAX_PLAYERS];
new 
Float:ppos[MAX_PLAYERS][3];
enum Float:PosFloat:sX,Float:sY,Float:sZ };
new 
Float:SavedPos[MAX_PLAYERS][Pos];
new 
bool:DriftMode[MAX_PLAYERS]=false;
new 
DriftBonus[MAX_PLAYERS]=1;
new 
Float:HealthInit[MAX_PLAYERS]=1000.0;
new 
bool:AutoFixBool[MAX_PLAYERS]=true;
new 
Text:TDLabels[3];
new 
Text:TDValueDrift[MAX_PLAYERS];
new 
Text:TDValueBonus[MAX_PLAYERS];
new 
Text:TDValueCash[MAX_PLAYERS];
forward Drift();
forward AngleUpdate();
forward DriftExit(playerid);
forward CheckPlayerState();
forward AutoFix();
public 
OnFilterScriptInit(){
        
TimerA=SetTimer("AngleUpdate"200true);
        
TimerB=SetTimer("AutoFix"500true);
        
TimerC=SetTimer("CheckPlayerState"100true);
        
LoadTextDraws();
        return 
1;
}
public 
OnFilterScriptExit(){
    
KillTimer(TimerA);
    
KillTimer(TimerB);
    
KillTimer(TimerC);
    return 
1;
}
Float:GetPlayerTheoreticAngle(i)
{
// y = vertical = |
// x = horizontal = -
        
new Float:sin;
        new 
Float:dis;
        new 
Float:angle2;
        new 
Float:x,Float:y,Float:z;
        new 
Float:tmp3;
        new 
Float:tmp4;
        new 
Float:MindAngle;
        if(
IsPlayerConnected(i)){
                
GetPlayerPos(i,x,y,z);
                
dis floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));
                if(
IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(iangle2);}
                if(
x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
                if(
y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}
                if(
ppos[i][1]>&& ppos[i][0]>x){
                    
sin asin(tmp3/dis);
                    
MindAngle floatsub(floatsub(floatadd(sin90), floatmul(sin2)), -90.0);//   MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
                
}
                if(
ppos[i][1]<&& ppos[i][0]>x){
                    
sin asin(tmp3/dis);
                    
MindAngle floatsub(floatadd(sin180), 180.0);//MindAngle = floatsub(floatadd(sin, 180), 180.0);
                
}
                if(
ppos[i][1]<&& ppos[i][0]<x){
                    
sin acos(tmp4/dis);
                    
MindAngle floatsub(floatadd(sin360), floatmul(sin2));//MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
                
}
                if(
ppos[i][1]>&& ppos[i][0]<x){
                    
sin asin(tmp3/dis);
                    
MindAngle floatadd(sin180);//MindAngle = floatadd(sin, 180);
                
}
        }
        if(
MindAngle == 0.0){return angle2;}else{return MindAngle;}
}
public 
DriftExit(playerid){
        
PlayerDriftCancellation[playerid] = 0;
         
/////////////////////////////////////
        
new Float:h;
        
GetVehicleHealth(GetPlayerVehicleID(playerid),h);
        if(
DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]);
        
TextDrawHideForPlayer(playerid,TDLabels[0]);
        
TextDrawHideForPlayer(playerid,TDLabels[1]);
        
TextDrawHideForPlayer(playerid,TDLabels[2]);
        
TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
        
TextDrawHideForPlayer(playerid,TDValueBonus[playerid]);
        
TextDrawHideForPlayer(playerid,TDValueCash[playerid]);
        
DriftBonus[playerid]=1;
        
AutoFixBool[playerid]=true;
        
SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
        
////////////////////////////////////////////////////
        
DriftPointsNow[playerid] = 0;
}
Float:ReturnPlayerAngle(playerid){
        new 
Float:Ang;
        if(
IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playeridAng);
        return 
Ang;
}
public 
Drift(){
        new 
Float:Angle1Float:Angle2Float:BySpeed;
        new 
Float:Z;
        new 
Float:X;
        new 
Float:Y;
        new 
Float:SpeedX;
        for(new 
g=0;g<200;g++){
                
GetPlayerPos(gXYZ);
                
SpeedX floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos][ sZ ])),2)));
                
Angle1 ReturnPlayerAngle(g);
                
Angle2 GetPlayerTheoreticAngle(g);
                
BySpeed floatmul(SpeedX12);
                if(
IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1Angle2)) < DRIFT_MAXKAT && BySpeed DRIFT_SPEED){
                        if(
PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
                        
PlayerDriftCancellation[g] = 0;
                        
DriftPointsNow[g] += floatvalfloatabs(floatsub(Angle1Angle2)) * * (BySpeed*0.1) )/10;
                        
PlayerDriftCancellation[g] = SetTimerEx("DriftExit"30000"d"g);
                }
                if(
DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){
                    
/////////////////////////////////
                    
if(DriftPointsNow[g]<500){
                        
DriftBonus[g]=1;
                    }
                    if(
DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000){
                        
DriftBonus[g]=2;
                    }
                    if(
DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700){
                        
DriftBonus[g]=3;
                    }
                    if(
DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500){
                        
DriftBonus[g]=4;
                    }
                    if(
DriftPointsNow[g]>=2500){
                        
DriftBonus[g]=5;
                    }
                    
TextDrawShowForPlayer(g,TDLabels[0]);
                    
TextDrawShowForPlayer(g,TDLabels[1]);
                    
TextDrawShowForPlayer(g,TDLabels[2]);
                    
TextDrawShowForPlayer(g,TDValueDrift[g]);
                    
TextDrawShowForPlayer(g,TDValueBonus[g]);
                    
TextDrawShowForPlayer(g,TDValueCash[g]);
                    new 
DPs[128],DBn[128],Cash[128],csh;
                    
valstr(DPs,DriftPointsNow[g],false);
                    
format(DBn,sizeof(DBn),"X%i",DriftBonus[g]);
                    
csh=DriftPointsNow[g]*DriftBonus[g];
                    
format(Cash,sizeof(Cash),"$%i",csh);
                    
TextDrawSetString(TDValueDrift[g],DPs);
                    
TextDrawSetString(TDValueBonus[g],DBn);
                    
TextDrawSetString(TDValueCash[g],Cash);
                    
////////////////////////////////////////
                
}
                
SavedPos][ sX ] = X;
                
SavedPos][ sY ] = Y;
                
SavedPos][ sZ ] = Z;
        }
}
public 
AngleUpdate() {
        for(new 
g=0;g<=MAX_PLAYERS;g++){
                new 
Float:xFloat:yFloat:z;
                if(
IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), xyz); else GetPlayerPos(gxyz);
                
ppos[g][0] = x;
                
ppos[g][1] = y;
                
ppos[g][2] = z;
        }
}
floatval(Float:val){
        new 
str[256];
        
format(str256"%.0f"val);
        return 
todec(str);
}
todec(str[]){
        return 
strval(str);
}
LoadTextDraws(){
    
TDLabels[0]=TextDrawCreate(Label_X,TD_Y,"Drift (Derrape)");
    
TextDrawColor(TDLabels[0],COLOR_Label);
    
TextDrawSetShadow(TDLabels[0],0);
    
TextDrawSetOutline(TDLabels[0],1);
    
TextDrawLetterSize(TDLabels[0],0.5,2);
    
TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut);
    
TextDrawFont(TDLabels[0],1);
    
TDLabels[1]=TextDrawCreate(Label_X,TD_Y+50,"Bonus");
    
TextDrawColor(TDLabels[1],COLOR_Label);
    
TextDrawSetShadow(TDLabels[1],0);
    
TextDrawSetOutline(TDLabels[1],1);
    
TextDrawLetterSize(TDLabels[1],0.5,2);
    
TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut);
    
TextDrawFont(TDLabels[1],1);
    
TDLabels[2]=TextDrawCreate(Label_X,TD_Y+100,"Dinero");
    
TextDrawColor(TDLabels[2],COLOR_Label);
    
TextDrawSetShadow(TDLabels[2],0);
    
TextDrawSetOutline(TDLabels[2],1);
    
TextDrawLetterSize(TDLabels[2],0.5,2);
    
TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut);
    
TextDrawFont(TDLabels[2],1);
    new 
i;
    for(
i=0;i<=MAX_PLAYERS;i++){
        
TDValueDrift[i]=TextDrawCreate(Value_X,TD_Y+20,"0");
        
TextDrawColor(TDValueDrift[i],COLOR_Value);
        
TextDrawSetShadow(TDValueDrift[i],0);
        
TextDrawSetOutline(TDValueDrift[i],1);
        
TextDrawLetterSize(TDValueDrift[i],0.5,2);
        
TextDrawBackgroundColor(TDValueDrift[i],COLOR_ValueOut);
        
TextDrawFont(TDValueDrift[i],3);
        
TDValueBonus[i]=TextDrawCreate(Value_X,TD_Y+70,"X1");
        
TextDrawColor(TDValueBonus[i],COLOR_Value);
        
TextDrawSetShadow(TDValueBonus[i],0);
        
TextDrawSetOutline(TDValueBonus[i],1);
        
TextDrawLetterSize(TDValueBonus[i],0.5,2);
        
TextDrawBackgroundColor(TDValueBonus[i],COLOR_ValueOut);
        
TextDrawFont(TDValueBonus[i],3);
        
TDValueCash[i]=TextDrawCreate(Value_X,TD_Y+100,"$0");
        
TextDrawColor(TDValueCash[i],COLOR_Value);
        
TextDrawSetShadow(TDValueCash[i],0);
        
TextDrawSetOutline(TDValueCash[i],1);
        
TextDrawLetterSize(TDValueCash[i],0.5,2);
        
TextDrawBackgroundColor(TDValueCash[i],COLOR_ValueOut);
        
TextDrawFont(TDValueCash[i],3);
    }
    return 
1;
}
public 
CheckPlayerState(){
    new 
i,cs;
    for(
i=0;i<=MAX_PLAYERS;i++){
        
cs=GetPlayerState(i);
        if(
DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>70){
            new 
Float:h;
            
GetVehicleHealth(GetPlayerVehicleID(i),h);
            if(
h<HealthInit[i]){
                
KillTimer(DriftTimer[i]);
                
DriftExit(i);
                
DriftMode[i]=false;
            }
        }
        if(
cs==PLAYER_STATE_DRIVER && DriftMode[i]==false){
            if(
GetVType(GetPlayerVehicleID(i))){
                
DriftMode[i]=true;
                
GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
                
DriftTimer[i]=SetTimerEx("Drift"200true"i"i);
            }
        }
        else if(
cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true){
            
KillTimer(DriftTimer[i]);
            
DriftMode[i]=false;
        }
        else{}
    }
    return 
1;
}
public 
AutoFix(){
    new 
i;
    for(
i=0;i<=MAX_PLAYERS;i++){
        if(
AutoFixBool[i] && IsPlayerInAnyVehicle(i)){
            
SetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
        }
    }
}
GetVType(vid){
    new 
Convertibles[4]={480533439555};
    new 
Industrial[26]={499422482498609524578455403414582443514413515440543605459531408552478456554};
    new 
LowRider[8]={536575534567535566576412};
    new 
OffRoad[13]={568424573579400500444556557470489505595};
    new 
Service[19]={416433431438437523427490528407544596596597598599432601420};
    new 
Saloon[35]={445504401518527542507562585419526604466492474546517410551516467600426436547405580560550549540491529421};
    new 
Sports[20]={602429496402541415589587565494502503411559603475506451558477};
    new 
Wagons[5]={418404479458561};
    new 
modelid=GetVehicleModel(vid);
    new 
i;
    for(
i=0;i<3;i++){
            if(
Convertibles[i]==modelid) return 1;
    }
    for(
i=0;i<25;i++){
            if(
Industrial[i]==modelid) return 1;
    }
    for(
i=0;i<7;i++){
            if(
LowRider[i]==modelid) return 1;
    }
    for(
i=0;i<12;i++){
            if(
OffRoad[i]==modelid) return 1;
    }
    for(
i=0;i<19;i++){
            if(
Service[i]==modelid) return 1;
    }
    for(
i=0;i<35;i++){
            if(
Saloon[i]==modelid) return 1;
    }
    for(
i=0;i<20;i++){
            if(
Sports[i]==modelid) return 1;
    }
    for(
i=0;i<5;i++){
            if(
Wagons[i]==modelid) return 1;
    }
    return 
0;

Y Aqui Las Coordenadas Que Saque Con Zmamaroth (o como se escriba xD)

PHP код:
Textdraw0 TextDrawCreate(16.000000265.000000"Drift:");
Textdraw1 TextDrawCreate(58.000000255.000000"150");
Textdraw2 TextDrawCreate(16.000000298.000000"Bonus:");
Textdraw3 TextDrawCreate(70.000000298.000000"x1");
Textdraw4 TextDrawCreate(15.000000324.000000"Dinero:");
Textdraw5 TextDrawCreate(75.000000324.000000"$150"); 
pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT
#endif

#define DRIFT_MINKAT 10.0
#define DRIFT_MAXKAT 90.0
#define DRIFT_SPEED 30.0

///////////////////
#define COLOR_Label 0xFF0000FF//#define COLOR_Label 0xFFFFFFFF
#define COLOR_LabelOut 0x00000040//#define COLOR_LabelOut 0x00000040
#define COLOR_ValueOut 0x00000040//#define COLOR_ValueOut 0xFFFFFF40
#define COLOR_Value 0xFFFFFFFF//rojo//#define COLOR_Value 0x000000FF

#define Label_X 500
#define Value_X 500
#define TD_Y 100
/////////////////////////////////////

new DriftTimer[MAX_PLAYERS];
new TimerA,TimerB,TimerC;

new DriftPointsNow[MAX_PLAYERS];
new PlayerDriftCancellation[MAX_PLAYERS];
new Float:ppos[MAX_PLAYERS][3];
enum Float:Pos{ Float:sX,Float:sY,Float:sZ };
new Float:SavedPos[MAX_PLAYERS][Pos];

new bool:DriftMode[MAX_PLAYERS]=false;
new DriftBonus[MAX_PLAYERS]=1;
new Float:HealthInit[MAX_PLAYERS]=1000.0;
new bool:AutoFixBool[MAX_PLAYERS]=true;

new Text:TDLabels[3];
new Text:TDValueDrift[MAX_PLAYERS];
new Text:TDValueBonus[MAX_PLAYERS];
new Text:TDValueCash[MAX_PLAYERS];

forward Drift();
forward AngleUpdate();
forward DriftExit(playerid);
forward CheckPlayerState();
forward AutoFix();

public OnFilterScriptInit(){
        TimerA=SetTimer("AngleUpdate", 200, true);
        TimerB=SetTimer("AutoFix", 500, true);
        TimerC=SetTimer("CheckPlayerState", 100, true);
        LoadTextDraws();
        return 1;
}

public OnFilterScriptExit(){
    KillTimer(TimerA);
    KillTimer(TimerB);
    KillTimer(TimerC);
    return 1;
}

Float:GetPlayerTheoreticAngle(i)
{// y = vertical = |
// x = horizontal = -
        new Float:sin;
        new Float:dis;
        new Float:angle2;
        new Float:x,Float:y,Float:z;
        new Float:tmp3;
        new Float:tmp4;
        new Float:MindAngle;

        if(IsPlayerConnected(i)){

                GetPlayerPos(i,x,y,z);

                dis = floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));

                if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);}

                if(x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
                if(y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}

                if(ppos[i][1]>y && ppos[i][0]>x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);//   MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
                }

                if(ppos[i][1]<y && ppos[i][0]>x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatsub(floatadd(sin, 180), 180.0);//MindAngle = floatsub(floatadd(sin, 180), 180.0);
                }

                if(ppos[i][1]<y && ppos[i][0]<x){
                    sin = acos(tmp4/dis);
                    MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));//MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
                }

                if(ppos[i][1]>y && ppos[i][0]<x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatadd(sin, 180);//MindAngle = floatadd(sin, 180);
                }
        }

        if(MindAngle == 0.0){return angle2;}else{return MindAngle;}
}

public DriftExit(playerid){
        PlayerDriftCancellation[playerid] = 0;

         /////////////////////////////////////
        new Float:h;
        GetVehicleHealth(GetPlayerVehicleID(playerid),h);
        if(DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]);
        TextDrawHideForPlayer(playerid,TDLabels[0]);
        TextDrawHideForPlayer(playerid,TDLabels[1]);
        TextDrawHideForPlayer(playerid,TDLabels[2]);
        TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
        TextDrawHideForPlayer(playerid,TDValueBonus[playerid]);
        TextDrawHideForPlayer(playerid,TDValueCash[playerid]);
        DriftBonus[playerid]=1;
        AutoFixBool[playerid]=true;
        SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
        ////////////////////////////////////////////////////

        DriftPointsNow[playerid] = 0;
}

Float:ReturnPlayerAngle(playerid){
        new Float:Ang;
        if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang);
        return Ang;
}

public Drift(){
        new Float:Angle1, Float:Angle2, Float:BySpeed;
        new Float:Z;
        new Float:X;
        new Float:Y;
        new Float:SpeedX;
        for(new g=0;g<200;g++){
                GetPlayerPos(g, X, Y, Z);
                SpeedX = floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos[ g ][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos[ g ][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos[ g ][ sZ ])),2)));
                Angle1 = ReturnPlayerAngle(g);
                Angle2 = GetPlayerTheoreticAngle(g);
                BySpeed = floatmul(SpeedX, 12);
                if(IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1, Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1, Angle2)) < DRIFT_MAXKAT && BySpeed > DRIFT_SPEED){
                        if(PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
                        PlayerDriftCancellation[g] = 0;
                        DriftPointsNow[g] += floatval( floatabs(floatsub(Angle1, Angle2)) * 3 * (BySpeed*0.1) )/10;
                        PlayerDriftCancellation[g] = SetTimerEx("DriftExit", 3000, 0, "d", g);
                }

                if(DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){
                    /////////////////////////////////
                    if(DriftPointsNow[g]<500){
                        DriftBonus[g]=1;
                    }
                    if(DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000){
                        DriftBonus[g]=2;
                    }
                    if(DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700){
                        DriftBonus[g]=3;
                    }
                    if(DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500){
                        DriftBonus[g]=4;
                    }
                    if(DriftPointsNow[g]>=2500){
                        DriftBonus[g]=5;
                    }

                    TextDrawShowForPlayer(g,TDLabels[0]);
                    TextDrawShowForPlayer(g,TDLabels[1]);
                    TextDrawShowForPlayer(g,TDLabels[2]);

                    TextDrawShowForPlayer(g,TDValueDrift[g]);
                    TextDrawShowForPlayer(g,TDValueBonus[g]);
                    TextDrawShowForPlayer(g,TDValueCash[g]);

                    new DPs[128],DBn[128],Cash[128],csh;

                    valstr(DPs,DriftPointsNow[g],false);
                    format(DBn,sizeof(DBn),"X%i",DriftBonus[g]);
                    csh=DriftPointsNow[g]*DriftBonus[g];
                    format(Cash,sizeof(Cash),"$%i",csh);

                    TextDrawSetString(TDValueDrift[g],DPs);
                    TextDrawSetString(TDValueBonus[g],DBn);
                    TextDrawSetString(TDValueCash[g],Cash);
                    ////////////////////////////////////////
                }
                SavedPos[ g ][ sX ] = X;
                SavedPos[ g ][ sY ] = Y;
                SavedPos[ g ][ sZ ] = Z;
        }
}

public AngleUpdate() {
        for(new g=0;g<=MAX_PLAYERS;g++){
                new Float:x, Float:y, Float:z;
                if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), x, y, z); else GetPlayerPos(g, x, y, z);
                ppos[g][0] = x;
                ppos[g][1] = y;
                ppos[g][2] = z;
        }
}

floatval(Float:val){
        new str[256];
        format(str, 256, "%.0f", val);
        return todec(str);
}

todec(str[]){
        return strval(str);
}

LoadTextDraws(){
    TDLabels[0]=TextDrawCreate(16.000000, 265.000000,"Drift (Derrape)");
    TextDrawColor(TDLabels[0],COLOR_Label);
    TextDrawSetShadow(TDLabels[0],0);
    TextDrawSetOutline(TDLabels[0],1);
    TextDrawLetterSize(TDLabels[0],0.5,2);
    TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut);
    TextDrawFont(TDLabels[0],1);

    TDLabels[1]=TextDrawCreate(16.000000, 298.000000,"Bonus");
    TextDrawColor(TDLabels[1],COLOR_Label);
    TextDrawSetShadow(TDLabels[1],0);
    TextDrawSetOutline(TDLabels[1],1);
    TextDrawLetterSize(TDLabels[1],0.5,2);
    TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut);
    TextDrawFont(TDLabels[1],1);

    TDLabels[2]=TextDrawCreate(15.000000, 324.000000,"Dinero");
    TextDrawColor(TDLabels[2],COLOR_Label);
    TextDrawSetShadow(TDLabels[2],0);
    TextDrawSetOutline(TDLabels[2],1);
    TextDrawLetterSize(TDLabels[2],0.5,2);
    TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut);
    TextDrawFont(TDLabels[2],1);

    new i;
    for(i=0;i<=MAX_PLAYERS;i++){
        TDValueDrift[i]=TextDrawCreate(58.000000, 255.000000,"0");
        TextDrawColor(TDValueDrift[i],COLOR_Value);
        TextDrawSetShadow(TDValueDrift[i],0);
        TextDrawSetOutline(TDValueDrift[i],1);
        TextDrawLetterSize(TDValueDrift[i],0.5,2);
        TextDrawBackgroundColor(TDValueDrift[i],COLOR_ValueOut);
        TextDrawFont(TDValueDrift[i],3);

        TDValueBonus[i]=TextDrawCreate(70.000000, 298.000000,"X1");
        TextDrawColor(TDValueBonus[i],COLOR_Value);
        TextDrawSetShadow(TDValueBonus[i],0);
        TextDrawSetOutline(TDValueBonus[i],1);
        TextDrawLetterSize(TDValueBonus[i],0.5,2);
        TextDrawBackgroundColor(TDValueBonus[i],COLOR_ValueOut);
        TextDrawFont(TDValueBonus[i],3);

        TDValueCash[i]=TextDrawCreate(75.000000, 324.000000,"$0");
        TextDrawColor(TDValueCash[i],COLOR_Value);
        TextDrawSetShadow(TDValueCash[i],0);
        TextDrawSetOutline(TDValueCash[i],1);
        TextDrawLetterSize(TDValueCash[i],0.5,2);
        TextDrawBackgroundColor(TDValueCash[i],COLOR_ValueOut);
        TextDrawFont(TDValueCash[i],3);
    }

    return 1;
}

public CheckPlayerState(){
    new i,cs;

    for(i=0;i<=MAX_PLAYERS;i++){
        cs=GetPlayerState(i);
        if(DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>70){
            new Float:h;
            GetVehicleHealth(GetPlayerVehicleID(i),h);
            if(h<HealthInit[i]){
                KillTimer(DriftTimer[i]);
                DriftExit(i);
                DriftMode[i]=false;
            }
        }
        if(cs==PLAYER_STATE_DRIVER && DriftMode[i]==false){
            if(GetVType(GetPlayerVehicleID(i))){
                DriftMode[i]=true;
                GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
                DriftTimer[i]=SetTimerEx("Drift", 200, true, "i", i);
            }
        }
        else if(cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true){
            KillTimer(DriftTimer[i]);
            DriftMode[i]=false;
        }
        else{}
    }
    return 1;
}

public AutoFix(){
    new i;
    for(i=0;i<=MAX_PLAYERS;i++){
        if(AutoFixBool[i] && IsPlayerInAnyVehicle(i)){
            SetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
        }
    }
}

GetVType(vid){

    new Convertibles[4]={480, 533, 439, 555};
    new Industrial[26]={499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554};
    new LowRider[8]={536, 575, 534, 567, 535, 566, 576, 412};
    new OffRoad[13]={568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 595};
    new Service[19]={416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 596, 597, 598, 599, 432, 601, 420};
    new Saloon[35]={445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421};
    new Sports[20]={602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477};
    new Wagons[5]={418, 404, 479, 458, 561};

    new modelid=GetVehicleModel(vid);
    new i;
    for(i=0;i<3;i++){
            if(Convertibles[i]==modelid) return 1;
    }
    for(i=0;i<25;i++){
            if(Industrial[i]==modelid) return 1;
    }
    for(i=0;i<7;i++){
            if(LowRider[i]==modelid) return 1;
    }
    for(i=0;i<12;i++){
            if(OffRoad[i]==modelid) return 1;
    }
    for(i=0;i<19;i++){
            if(Service[i]==modelid) return 1;
    }
    for(i=0;i<35;i++){
            if(Saloon[i]==modelid) return 1;
    }
    for(i=0;i<20;i++){
            if(Sports[i]==modelid) return 1;
    }
    for(i=0;i<5;i++){
            if(Wagons[i]==modelid) return 1;
    }
    return 0;
}
Por Favor usa code pawn, para dejar codigos [Pawn ][/ Pawn]
Reply
#9

Quote:
Originally Posted by Raylan Givens
Посмотреть сообщение
pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT
#endif

#define DRIFT_MINKAT 10.0
#define DRIFT_MAXKAT 90.0
#define DRIFT_SPEED 30.0

///////////////////
#define COLOR_Label 0xFF0000FF//#define COLOR_Label 0xFFFFFFFF
#define COLOR_LabelOut 0x00000040//#define COLOR_LabelOut 0x00000040
#define COLOR_ValueOut 0x00000040//#define COLOR_ValueOut 0xFFFFFF40
#define COLOR_Value 0xFFFFFFFF//rojo//#define COLOR_Value 0x000000FF

#define Label_X 500
#define Value_X 500
#define TD_Y 100
/////////////////////////////////////

new DriftTimer[MAX_PLAYERS];
new TimerA,TimerB,TimerC;

new DriftPointsNow[MAX_PLAYERS];
new PlayerDriftCancellation[MAX_PLAYERS];
new Float:ppos[MAX_PLAYERS][3];
enum Float:Pos{ Float:sX,Float:sY,Float:sZ };
new Float:SavedPos[MAX_PLAYERS][Pos];

new bool:DriftMode[MAX_PLAYERS]=false;
new DriftBonus[MAX_PLAYERS]=1;
new Float:HealthInit[MAX_PLAYERS]=1000.0;
new bool:AutoFixBool[MAX_PLAYERS]=true;

new Text:TDLabels[3];
new Text:TDValueDrift[MAX_PLAYERS];
new Text:TDValueBonus[MAX_PLAYERS];
new Text:TDValueCash[MAX_PLAYERS];

forward Drift();
forward AngleUpdate();
forward DriftExit(playerid);
forward CheckPlayerState();
forward AutoFix();

public OnFilterScriptInit(){
        TimerA=SetTimer("AngleUpdate", 200, true);
        TimerB=SetTimer("AutoFix", 500, true);
        TimerC=SetTimer("CheckPlayerState", 100, true);
        LoadTextDraws();
        return 1;
}

public OnFilterScriptExit(){
    KillTimer(TimerA);
    KillTimer(TimerB);
    KillTimer(TimerC);
    return 1;
}

Float:GetPlayerTheoreticAngle(i)
{// y = vertical = |
// x = horizontal = -
        new Float:sin;
        new Float:dis;
        new Float:angle2;
        new Float:x,Float:y,Float:z;
        new Float:tmp3;
        new Float:tmp4;
        new Float:MindAngle;

        if(IsPlayerConnected(i)){

                GetPlayerPos(i,x,y,z);

                dis = floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));

                if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);}

                if(x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
                if(y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}

                if(ppos[i][1]>y && ppos[i][0]>x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);//   MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
                }

                if(ppos[i][1]<y && ppos[i][0]>x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatsub(floatadd(sin, 180), 180.0);//MindAngle = floatsub(floatadd(sin, 180), 180.0);
                }

                if(ppos[i][1]<y && ppos[i][0]<x){
                    sin = acos(tmp4/dis);
                    MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));//MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
                }

                if(ppos[i][1]>y && ppos[i][0]<x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatadd(sin, 180);//MindAngle = floatadd(sin, 180);
                }
        }

        if(MindAngle == 0.0){return angle2;}else{return MindAngle;}
}

public DriftExit(playerid){
        PlayerDriftCancellation[playerid] = 0;

         /////////////////////////////////////
        new Float:h;
        GetVehicleHealth(GetPlayerVehicleID(playerid),h);
        if(DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]);
        TextDrawHideForPlayer(playerid,TDLabels[0]);
        TextDrawHideForPlayer(playerid,TDLabels[1]);
        TextDrawHideForPlayer(playerid,TDLabels[2]);
        TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
        TextDrawHideForPlayer(playerid,TDValueBonus[playerid]);
        TextDrawHideForPlayer(playerid,TDValueCash[playerid]);
        DriftBonus[playerid]=1;
        AutoFixBool[playerid]=true;
        SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
        ////////////////////////////////////////////////////

        DriftPointsNow[playerid] = 0;
}

Float:ReturnPlayerAngle(playerid){
        new Float:Ang;
        if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang);
        return Ang;
}

public Drift(){
        new Float:Angle1, Float:Angle2, Float:BySpeed;
        new Float:Z;
        new Float:X;
        new Float:Y;
        new Float:SpeedX;
        for(new g=0;g<200;g++){
                GetPlayerPos(g, X, Y, Z);
                SpeedX = floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos[ g ][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos[ g ][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos[ g ][ sZ ])),2)));
                Angle1 = ReturnPlayerAngle(g);
                Angle2 = GetPlayerTheoreticAngle(g);
                BySpeed = floatmul(SpeedX, 12);
                if(IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1, Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1, Angle2)) < DRIFT_MAXKAT && BySpeed > DRIFT_SPEED){
                        if(PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
                        PlayerDriftCancellation[g] = 0;
                        DriftPointsNow[g] += floatval( floatabs(floatsub(Angle1, Angle2)) * 3 * (BySpeed*0.1) )/10;
                        PlayerDriftCancellation[g] = SetTimerEx("DriftExit", 3000, 0, "d", g);
                }

                if(DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){
                    /////////////////////////////////
                    if(DriftPointsNow[g]<500){
                        DriftBonus[g]=1;
                    }
                    if(DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000){
                        DriftBonus[g]=2;
                    }
                    if(DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700){
                        DriftBonus[g]=3;
                    }
                    if(DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500){
                        DriftBonus[g]=4;
                    }
                    if(DriftPointsNow[g]>=2500){
                        DriftBonus[g]=5;
                    }

                    TextDrawShowForPlayer(g,TDLabels[0]);
                    TextDrawShowForPlayer(g,TDLabels[1]);
                    TextDrawShowForPlayer(g,TDLabels[2]);

                    TextDrawShowForPlayer(g,TDValueDrift[g]);
                    TextDrawShowForPlayer(g,TDValueBonus[g]);
                    TextDrawShowForPlayer(g,TDValueCash[g]);

                    new DPs[128],DBn[128],Cash[128],csh;

                    valstr(DPs,DriftPointsNow[g],false);
                    format(DBn,sizeof(DBn),"X%i",DriftBonus[g]);
                    csh=DriftPointsNow[g]*DriftBonus[g];
                    format(Cash,sizeof(Cash),"$%i",csh);

                    TextDrawSetString(TDValueDrift[g],DPs);
                    TextDrawSetString(TDValueBonus[g],DBn);
                    TextDrawSetString(TDValueCash[g],Cash);
                    ////////////////////////////////////////
                }
                SavedPos[ g ][ sX ] = X;
                SavedPos[ g ][ sY ] = Y;
                SavedPos[ g ][ sZ ] = Z;
        }
}

public AngleUpdate() {
        for(new g=0;g<=MAX_PLAYERS;g++){
                new Float:x, Float:y, Float:z;
                if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), x, y, z); else GetPlayerPos(g, x, y, z);
                ppos[g][0] = x;
                ppos[g][1] = y;
                ppos[g][2] = z;
        }
}

floatval(Float:val){
        new str[256];
        format(str, 256, "%.0f", val);
        return todec(str);
}

todec(str[]){
        return strval(str);
}

LoadTextDraws(){
    TDLabels[0]=TextDrawCreate(16.000000, 265.000000,"Drift (Derrape)");
    TextDrawColor(TDLabels[0],COLOR_Label);
    TextDrawSetShadow(TDLabels[0],0);
    TextDrawSetOutline(TDLabels[0],1);
    TextDrawLetterSize(TDLabels[0],0.5,2);
    TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut);
    TextDrawFont(TDLabels[0],1);

    TDLabels[1]=TextDrawCreate(16.000000, 298.000000,"Bonus");
    TextDrawColor(TDLabels[1],COLOR_Label);
    TextDrawSetShadow(TDLabels[1],0);
    TextDrawSetOutline(TDLabels[1],1);
    TextDrawLetterSize(TDLabels[1],0.5,2);
    TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut);
    TextDrawFont(TDLabels[1],1);

    TDLabels[2]=TextDrawCreate(15.000000, 324.000000,"Dinero");
    TextDrawColor(TDLabels[2],COLOR_Label);
    TextDrawSetShadow(TDLabels[2],0);
    TextDrawSetOutline(TDLabels[2],1);
    TextDrawLetterSize(TDLabels[2],0.5,2);
    TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut);
    TextDrawFont(TDLabels[2],1);

    new i;
    for(i=0;i<=MAX_PLAYERS;i++){
        TDValueDrift[i]=TextDrawCreate(58.000000, 255.000000,"0");
        TextDrawColor(TDValueDrift[i],COLOR_Value);
        TextDrawSetShadow(TDValueDrift[i],0);
        TextDrawSetOutline(TDValueDrift[i],1);
        TextDrawLetterSize(TDValueDrift[i],0.5,2);
        TextDrawBackgroundColor(TDValueDrift[i],COLOR_ValueOut);
        TextDrawFont(TDValueDrift[i],3);

        TDValueBonus[i]=TextDrawCreate(70.000000, 298.000000,"X1");
        TextDrawColor(TDValueBonus[i],COLOR_Value);
        TextDrawSetShadow(TDValueBonus[i],0);
        TextDrawSetOutline(TDValueBonus[i],1);
        TextDrawLetterSize(TDValueBonus[i],0.5,2);
        TextDrawBackgroundColor(TDValueBonus[i],COLOR_ValueOut);
        TextDrawFont(TDValueBonus[i],3);

        TDValueCash[i]=TextDrawCreate(75.000000, 324.000000,"$0");
        TextDrawColor(TDValueCash[i],COLOR_Value);
        TextDrawSetShadow(TDValueCash[i],0);
        TextDrawSetOutline(TDValueCash[i],1);
        TextDrawLetterSize(TDValueCash[i],0.5,2);
        TextDrawBackgroundColor(TDValueCash[i],COLOR_ValueOut);
        TextDrawFont(TDValueCash[i],3);
    }

    return 1;
}

public CheckPlayerState(){
    new i,cs;

    for(i=0;i<=MAX_PLAYERS;i++){
        cs=GetPlayerState(i);
        if(DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>70){
            new Float:h;
            GetVehicleHealth(GetPlayerVehicleID(i),h);
            if(h<HealthInit[i]){
                KillTimer(DriftTimer[i]);
                DriftExit(i);
                DriftMode[i]=false;
            }
        }
        if(cs==PLAYER_STATE_DRIVER && DriftMode[i]==false){
            if(GetVType(GetPlayerVehicleID(i))){
                DriftMode[i]=true;
                GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
                DriftTimer[i]=SetTimerEx("Drift", 200, true, "i", i);
            }
        }
        else if(cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true){
            KillTimer(DriftTimer[i]);
            DriftMode[i]=false;
        }
        else{}
    }
    return 1;
}

public AutoFix(){
    new i;
    for(i=0;i<=MAX_PLAYERS;i++){
        if(AutoFixBool[i] && IsPlayerInAnyVehicle(i)){
            SetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
        }
    }
}

GetVType(vid){

    new Convertibles[4]={480, 533, 439, 555};
    new Industrial[26]={499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554};
    new LowRider[8]={536, 575, 534, 567, 535, 566, 576, 412};
    new OffRoad[13]={568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 595};
    new Service[19]={416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 596, 597, 598, 599, 432, 601, 420};
    new Saloon[35]={445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421};
    new Sports[20]={602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477};
    new Wagons[5]={418, 404, 479, 458, 561};

    new modelid=GetVehicleModel(vid);
    new i;
    for(i=0;i<3;i++){
            if(Convertibles[i]==modelid) return 1;
    }
    for(i=0;i<25;i++){
            if(Industrial[i]==modelid) return 1;
    }
    for(i=0;i<7;i++){
            if(LowRider[i]==modelid) return 1;
    }
    for(i=0;i<12;i++){
            if(OffRoad[i]==modelid) return 1;
    }
    for(i=0;i<19;i++){
            if(Service[i]==modelid) return 1;
    }
    for(i=0;i<35;i++){
            if(Saloon[i]==modelid) return 1;
    }
    for(i=0;i<20;i++){
            if(Sports[i]==modelid) return 1;
    }
    for(i=0;i<5;i++){
            if(Wagons[i]==modelid) return 1;
    }
    return 0;
}
Por Favor usa code pawn, para dejar codigos [Pawn ][/ Pawn]
LOOOL, Por Loque Vi En El Fs, Era Super Facil Cambiarlo xD!
Muchas Gracias Amigo, Llebaba Dias Con Esto xD

Una Pregunta Mas; Loque pasa esque cuando inicia el server, me quita 2 textdraws que uso importantes, y ya le agregue el #define FILTERSCRIPT pero igual melos quita, y quito el Fs del server.cfg y hay si me aparecen los otros textdrwas.... ї Que Podria Hacer ?
Reply
#10

Como dices, no logro comprender lo que te pasa, si me podes repetir todo especнficamente y con fotos o algo para ver mejor, asн veo el problema.

PD: Si era muy fбcil y mas fбcil fue por que me diste las cordenadas jaja

Saludos.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)