Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - nyE

Oldalak: 1 2 [3] 4 5 ... 117
31
Hangszerek és előadók / Mit hallgatsz most vol. 2
« Dátum: 2012. november 01. - 22:17:23 »

32
SA-MP: Szerverfejlesztés / Anims lista
« Dátum: 2012. november 01. - 19:18:48 »
Publikálás elõtt bizonyosodj meg róla\' date=\' hogy a script mûködik! Ne publikálj nem tesztelt scriptet![/quote]

33
Tetszik a betütípus :D A jobb oldal szerintem kicsit üres, egy logót vagy valamit még tehettél volna oda.

34
GTA V: Alap információk / GTA V - Hivatalosan is bejelentve!
« Dátum: 2012. november 01. - 19:05:42 »
iFruit :D Ezen jót nevettem. :D

35
Szkript kérések / Ölések Halálok !
« Dátum: 2012. november 01. - 18:29:11 »

36
Segítségkérés / Mapolások
« Dátum: 2012. november 01. - 18:09:19 »
A szervergépeken általában Linux fut, ezért a streamer.so-t másold fel a dll helyett.

37
Segítségkérés / Halál
« Dátum: 2012. október 22. - 10:21:41 »
Nem teszteltem...
 

#include <a_samp>
new DeathTimer[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
    DeathTimer[playerid] = SetTimerEx(\"Leave\", 60 * 1000, true, \"i\", playerid); // Elindítjuk a timert
    SetPlayerPos(X, Y, Z); // A koordináta ahova rakja ha meghal
    return 1;
}
forward Leave(playerid);
public Leave(playerid)
{
    KillTimer(DeathTimer[playerid]); // Ha lejár az idõ kikapcsoljuk a timert (biztos ami biztos)
    SpawnPlayer(playerid); // és lespawnoljuk
    return 1;
}

38
Segítségkérés / Place Marker (Vagy mi)
« Dátum: 2012. október 21. - 12:05:24 »
Keresgess az include fájlokban erre: \" You place marker at point: \"

39
Segítségkérés / Létezik?
« Dátum: 2012. október 10. - 16:33:17 »
Persze, a GarHouse. Keress rá.

40
Archívum / Original Tokyo Drift Clan Szerver[0-24]
« Dátum: 2012. október 10. - 16:27:57 »
Idézetet írta: pEnZi date=1349871507\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28432\" data-ipsquote-contentclass=\"forums_Topic
jaaah, csak mint mondtam már, Antonyo-é volt minden.. max. a map amit egy másik srác csinált.. szal nem tudom mire veri magát. :confused:
 
Anno 2010-ben megkerestem Hant, hogy nem-e akar szervert a klánjának. Így megalapítottuk hárman a TDC szerverét amit én, Han meg pEnZi fizettünk. A módot én írtam, Han mappolt, pEnZi pedig ötleteket adott... Aztán mikor már sok balhé volt a szervert bezártuk. Én örülök annak, hogy tovább megy a szerver, csak az a baj, hogy soha nem lesz olyan mint akkor volt (délutánonként állandóan 30/30). \"A legenda tovább él \" :D

41

CMD:duty(playerid,params[])
{
        if(Info[playerid][admin] != 1 && Info[playerid][admin] != 2 && Info[playerid][admin] != 3 && Info[playerid][admin] != 4 && Info[playerid][admin] == 5)
        {
            new szin;
            if(sscanf(params,\"d\",szin)) return SendClientMessage(playerid, COLOR_RED, \"Használat: /duty < 0-5 >\");
            if(szin == 0 || szin == 1 || szin == 2 || szin == 3 || szin == 4 || szin == 5)
            {
                    if(szin == 0)
                    {
                        asz[playerid] = 0;
                        SendClientMessage(playerid, COLOR_WHITE, \"Adminszolgálat kikapcsolva.\");
                        GetPlayerName(playerid, str,sizeof(str));
                        format(str,128,\"%s kilépett az adminszolgálatból.\",str);
                        SendClientMessageToAll(COLOR_RED,str);
                        }
                        else if(szin == 1)
                    {
                        asz[playerid] = 1;
                        SendClientMessage(playerid, COLOR_WHITE, \"Adminszolgálat bekapcsolva. ( Citromsárga )\");
                        GetPlayerName(playerid, str,sizeof(str));
                        format(str,128,\"%s adminszolgálatba lépett.\",str);
                        SendClientMessageToAll(COLOR_RED,str);
                        }
                        else if(szin == 2)
                    {
                        asz[playerid] = 2;
                        SendClientMessage(playerid, COLOR_WHITE, \"Adminszolgálat bekapcsolva. ( Piros )\");
                        GetPlayerName(playerid, str,sizeof(str));
                        format(str,128,\"%s adminszolgálatba lépett.\",str);
                        SendClientMessageToAll(COLOR_RED,str);
                        }
                        else if(szin == 3)
                    {
                        asz[playerid] = 3;
                        SendClientMessage(playerid, COLOR_WHITE, \"Adminszolgálat bekapcsolva. ( Kék )\");
                        GetPlayerName(playerid, str,sizeof(str));
                        format(str,128,\"%s adminszolgálatba lépett.\",str);
                        SendClientMessageToAll(COLOR_RED,str);
                        }
                        else if(szin == 4)
                    {
                        asz[playerid] = 4;
                        SendClientMessage(playerid, COLOR_WHITE, \"Adminszolgálat bekapcsolva. ( Zöld )\");
                        GetPlayerName(playerid, str,sizeof(str));
                        format(str,128,\"%s adminszolgálatba lépett.\",str);
                        SendClientMessageToAll(COLOR_RED,str);
                        }
                        else if(szin == 5)
                    {
                        asz[playerid] = 5;
                        SendClientMessage(playerid, COLOR_WHITE, \"Adminszolgálat bekapcsolva. ( Fehér )\");
                        GetPlayerName(playerid, str,sizeof(str));
                        format(str,128,\"%s adminszolgálatba lépett.\",str);
                        SendClientMessageToAll(COLOR_RED,str);
                        }
                } else { SendClientMessage(playerid, COLOR_RED, \"A színek 0 és 5 között lehetnek.\"); }
        } else { SendClientMessage(playerid, COLOR_RED, \"Nem vagy adminisztrátor.\"); }
        return 1;

42
SA-MP: Szerverfejlesztés / Tüzes Kerekek By Hugo
« Dátum: 2012. szeptember 24. - 18:15:23 »
Ez, ez, ez tökjó :D Szerintem nem sok szerveren van ilyen. Grat!

43
Segítségkérés / Fs Gm
« Dátum: 2012. szeptember 24. - 15:31:41 »

#include a_samp
#include zcmd
new bool:szogesdrot, drot, Float:x, Float:y, Float:z, Float:Fordulas;
CMD:lerak(playerid, params[])
{
        if(szogesdrot == true) return SendClientMessage(playerid,0xff0000AA,\"Figyelem.Már raktak le szögesdrótot, ha leraksz mégegyet, a régit nem lehet felvenni.\"), szogesdrot = false;
        szogesdrot = true;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, Fordulas);
        DestroyObject(drot);
        drot = CreateObject(2892, x-1, y, z-1, 0.0, 0.0, Fordulas);
        SendClientMessage(playerid,0x009924AA,\"Leraktál egy szögesdrótot. Felvenni a /felszed paranccsal tudod.\");
        return 1;
}
CMD:felszed(playerid, params[])
{
        szogesdrot = false;
        DestroyObject(drot);
        SendClientMessage(playerid,0x009924AA,\"Felszedtél egy szögesdrótot.\");
        return 1;
}
public OnPlayerUpdate(playerid)
{
        new vehicleid = GetPlayerVehicleID(playerid);
        new panels, doors, lights, tires;
        GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
        if(szogesdrot == true && IsPlayerInRangeOfPoint(playerid, 4.0, x, y, z) && IsPlayerInAnyVehicle(playerid)) UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15), SendClientMessage(playerid,0xff0000AA,\"Rámentél egy szögesdrótra, a kerekeid kilyukadtak.\");
        return 1;
}
public OnGameModeInit()
{
SetGameModeText(\"MODOM\");
return 1;
}
prublic OnGameModeExit()
{
return 1;
}
main()
{
    print(\"Elvileg így jó lesz.\");
}

44
Segítségkérés / Drift számláló segítség
« Dátum: 2012. szeptember 22. - 19:42:54 »
Hali! A sokak által ismert Drift pont mérõt szeretném kicsit talakítani és ebben a segítségeteket szeretném kérni :D
Van ebben egy olyan rész, hogy amikor abbahagyom a driftelést megjavítja a kocsit. Na én ezt ki szeretném venni, de össze van kötve egy \"autofix\" rendszerrel ami driftelés után megjavítja a kocsit.
Én így próbáltam megoldani, de sajnos nem sikerült.
 

public CheckPlayerState() // by Abhinav
{
new i,cs;
for(i=0;i<=MAX_PLAYERS;i++)
{
    cs=GetPlayerState(i);
    if(DriftMode==true && cs==PLAYER_STATE_DRIVER && DriftPointsNow>70)
{
// itt ha nagyobb a kezdési élete a jármûnek, mint amennyi most, akkor vége a driftnek
// de ez nem akar mûködni
        new Float:h;
        if(driftHealth>GetVehicleHealth(GetPlayerVehicleID(i),h))
   {
           KillTimer(DriftTimer);
           DriftExit(i);
           GameTextForPlayer(i,\"~n~~n~~n~~n~~n~~n~~n~~r~Boom\",800,5);
           DriftMode=false;
   }
}
    if(cs==PLAYER_STATE_DRIVER && DriftMode==false)
{
        if(GetVType(GetPlayerVehicleID(i)))
   {
        DriftMode=true;
        new Float:h;
        driftHealth = GetVehicleHealth(GetPlayerVehicleID(i),h);
        DriftTimer=SetTimerEx(\"Drift\", 200, true, \"i\", i);
   }
}
else if(cs!=PLAYER_STATE_DRIVER && DriftMode==true)
{
    KillTimer(DriftTimer);
    DriftMode=false;
}
else{}
}
return 1;
}

 
Itt a teljes kód amit már módosítottam.
 

#include <a_samp>
#define DRIFT_MINKAT 10.0 // by Luby
#define DRIFT_MAXKAT 90.0 // by Luby
#define DRIFT_SPEED 30.0 // by Luby
#define COLOR_Label 0xFFFFFFFF
#define COLOR_LabelOut 0x00000040
#define COLOR_ValueOut 0xFFFFFF40
#define COLOR_Value 0x000000FF
#define Label_X 500
#define Value_X 500
#define TD_Y 100
/////////////////////////////////////
new DriftTimer[MAX_PLAYERS]; // Added by Abhinav
new TimerA,TimerC; // Added by Abhinav
new DriftPointsNow[MAX_PLAYERS]; // by Luby
new PlayerDriftCancellation[MAX_PLAYERS]; // by Luby
new Float:ppos[MAX_PLAYERS][3]; // by Luby
enum Float:Pos{ Float:sX,Float:sY,Float:sZ }; // by Luby
new Float:SavedPos[MAX_PLAYERS][Pos]; // by Luby
new bool:DriftMode[MAX_PLAYERS]=false; // Added by Abhinav
new DriftBonus[MAX_PLAYERS]=1; // Added by Abhinav
//new Float:HealthInit[MAX_PLAYERS]=1000.0; // Added by Abhinav
new Text:TDLabels[3]; // Added by Abhinav
new Text:TDValueDrift[MAX_PLAYERS]; // Added by Abhinav
new Text:TDValueBonus[MAX_PLAYERS]; // Added by Abhinav
new Text:TDValueCash[MAX_PLAYERS]; // Added by Abhinav
forward Drift(); // by Luby
forward AngleUpdate(); // by Luby
forward DriftExit(playerid); // by Luby
forward CheckPlayerState(); // Added by Abhinav
new Float: driftHealth[MAX_PLAYERS];
public OnFilterScriptInit()
{
TimerA=SetTimer(\"AngleUpdate\", 200, true); // by Luby
TimerC=SetTimer(\"CheckPlayerState\", 100, true); //by Abhinav
LoadTextDraws();
return 1;
}
public OnFilterScriptExit()
{
KillTimer(TimerA);
KillTimer(TimerC);
return 1;
}
Float:GetPlayerTheoreticAngle(i) // By Luby
{
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[0])),2)+floatpower(floatabs(floatsub(y,ppos[1])),2));
if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);}
if(x>ppos[0]){tmp3=x-ppos[0];}else{tmp3=ppos[0]-x;}
if(y>ppos[1]){tmp4=y-ppos[1];}else{tmp4=ppos[1]-y;}
if(ppos[1]>y && ppos[0]>x)
{
   sin = asin(tmp3/dis);
   MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
}
if(ppos[1]<y && ppos[0]>x)
{
   sin = asin(tmp3/dis);
   MindAngle = floatsub(floatadd(sin, 180), 180.0);
}
if(ppos[1]<y && ppos[0]<x)
{
   sin = acos(tmp4/dis);
   MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
}
if(ppos[1]>y && ppos[0]<x)
{
   sin = asin(tmp3/dis);
   MindAngle = floatadd(sin, 180);
}
}
if(MindAngle == 0.0){return angle2;}else{return MindAngle;}
}
public DriftExit(playerid) // By Luby
{
PlayerDriftCancellation[playerid] = 0;
////////////////// by Abhinav ///////////////////
new Float:h;
GetVehicleHealth(GetPlayerVehicleID(playerid),h);
if(DriftPointsNow[playerid] > 70 && DriftPointsNow[playerid] < 10000 && h == driftHealth[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;
new Float:e;
driftHealth[playerid] = GetVehicleHealth(GetPlayerVehicleID(playerid),e);
//SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
////////////////////////////////////////////////////
DriftPointsNow[playerid] = 0;
}
Float:ReturnPlayerAngle(playerid) // By Luby
{
new Float:Ang;
if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang);
return Ang;
}
public Drift() // By Luby
{
new Float:Angle1, Float:Angle2, Float:BySpeed;
new Float:Z;
new Float:X;
new Float:Y;
new Float:SpeedX;
for(new g=0;g<MAX_PLAYERS;g++)
{
    new Float:h;
driftHealth[g] = GetVehicleHealth(GetPlayerVehicleID(g),h);
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)
{
   ///////////// by Abhinav ////////////////////
   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() // By Luby
{
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) // By Luby
{
new str[256];
format(str, 256, \"%.0f\", val);
return todec(str);
}
todec(str[]) // By Luby
{
return strval(str);
}
LoadTextDraws() // by Abhinav
{
TDLabels[0]=TextDrawCreate(Label_X,TD_Y,\"Drift Points\");
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,\"Drift 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,\"Drift Cash\");
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=TextDrawCreate(Value_X,TD_Y+20,\"0\");
TextDrawColor(TDValueDrift,COLOR_Value);
TextDrawSetShadow(TDValueDrift,0);
TextDrawSetOutline(TDValueDrift,1);
TextDrawLetterSize(TDValueDrift,0.5,2);
TextDrawBackgroundColor(TDValueDrift,COLOR_ValueOut);
TextDrawFont(TDValueDrift,3);
TDValueBonus=TextDrawCreate(Value_X,TD_Y+70,\"X1\");
TextDrawColor(TDValueBonus,COLOR_Value);
TextDrawSetShadow(TDValueBonus,0);
TextDrawSetOutline(TDValueBonus,1);
TextDrawLetterSize(TDValueBonus,0.5,2);
TextDrawBackgroundColor(TDValueBonus,COLOR_ValueOut);
TextDrawFont(TDValueBonus,3);
TDValueCash=TextDrawCreate(Value_X,TD_Y+120,\"$0\");
TextDrawColor(TDValueCash,COLOR_Value);
TextDrawSetShadow(TDValueCash,0);
TextDrawSetOutline(TDValueCash,1);
TextDrawLetterSize(TDValueCash,0.5,2);
TextDrawBackgroundColor(TDValueCash,COLOR_ValueOut);
TextDrawFont(TDValueCash,3);
}
return 1;
}
public CheckPlayerState() // by Abhinav
{
new i,cs;
for(i=0;i<=MAX_PLAYERS;i++)
{
    cs=GetPlayerState(i);
    if(DriftMode==true && cs==PLAYER_STATE_DRIVER && DriftPointsNow>70)
{
   GameTextForPlayer(i,\"~n~~n~~n~~n~~n~~n~~n~~g~Boom\",800,5);
        new Float:h;
        if(driftHealth>GetVehicleHealth(GetPlayerVehicleID(i),h))
   {
           KillTimer(DriftTimer);
           DriftExit(i);
           GameTextForPlayer(i,\"~n~~n~~n~~n~~n~~n~~n~~r~Boom\",800,5);
           DriftMode=false;
   }
}
    if(cs==PLAYER_STATE_DRIVER && DriftMode==false)
{
        if(GetVType(GetPlayerVehicleID(i)))
   {
        DriftMode=true;
        new Float:h;
        driftHealth = GetVehicleHealth(GetPlayerVehicleID(i),h);
        DriftTimer=SetTimerEx(\"Drift\", 200, true, \"i\", i);
   }
}
else if(cs!=PLAYER_STATE_DRIVER && DriftMode==true)
{
    KillTimer(DriftTimer);
    DriftMode=false;
}
else{}
}
return 1;
}
GetVType(vid) // By Abhinav
{
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==modelid) return 1;
}
for(i=0;i<25;i++)
{
if(Industrial==modelid) return 1;
}
for(i=0;i<7;i++)
{
if(LowRider==modelid) return 1;
}
for(i=0;i<12;i++)
{
if(OffRoad==modelid) return 1;
}
for(i=0;i<19;i++)
{
if(Service==modelid) return 1;
}
for(i=0;i<35;i++)
{
if(Saloon==modelid) return 1;
}
for(i=0;i<20;i++)
{
if(Sports==modelid) return 1;
}
for(i=0;i<5;i++)
{
if(Wagons==modelid) return 1;
}
return 0;
}

 
és itt az eredeti.
 

////////////////////////////////////////////////////////////
/////////////// DRIFT POINTS COUNTER BY LUBY ///////////////
/////////////// A little editted by Abhinav ////////////////
////////////////////////////////////////////////////////////
#include <a_samp> // by I dont know .. :D lol
#define DRIFT_MINKAT 10.0 // by Luby
#define DRIFT_MAXKAT 90.0 // by Luby
#define DRIFT_SPEED 30.0 // by Luby
//////////// Added by Abhinav///////
#define COLOR_Label 0xFFFFFFFF
#define COLOR_LabelOut 0x00000040
#define COLOR_ValueOut 0xFFFFFF40
#define COLOR_Value 0x000000FF
#define Label_X 500
#define Value_X 500
#define TD_Y 100
/////////////////////////////////////
new DriftTimer[MAX_PLAYERS]; // Added by Abhinav
new TimerA,TimerB,TimerC; // Added by Abhinav
new DriftPointsNow[MAX_PLAYERS]; // by Luby
new PlayerDriftCancellation[MAX_PLAYERS]; // by Luby
new Float:ppos[MAX_PLAYERS][3]; // by Luby
enum Float:Pos{ Float:sX,Float:sY,Float:sZ }; // by Luby
new Float:SavedPos[MAX_PLAYERS][Pos]; // by Luby
new bool:DriftMode[MAX_PLAYERS]=false; // Added by Abhinav
new DriftBonus[MAX_PLAYERS]=1; // Added by Abhinav
new Float:HealthInit[MAX_PLAYERS]=1000.0; // Added by Abhinav
new bool:AutoFixBool[MAX_PLAYERS]=true; // Added by Abhinav
new Text:TDLabels[3]; // Added by Abhinav
new Text:TDValueDrift[MAX_PLAYERS]; // Added by Abhinav
new Text:TDValueBonus[MAX_PLAYERS]; // Added by Abhinav
new Text:TDValueCash[MAX_PLAYERS]; // Added by Abhinav
forward Drift(); // by Luby
forward AngleUpdate(); // by Luby
forward DriftExit(playerid); // by Luby
forward CheckPlayerState(); // Added by Abhinav
forward AutoFix(); // Added by Abhinav
public OnFilterScriptInit(){
        TimerA=SetTimer(\"AngleUpdate\", 200, true); // by Luby
        TimerB=SetTimer(\"AutoFix\", 500, true); //by Abhinav
        TimerC=SetTimer(\"CheckPlayerState\", 100, true); //by Abhinav
        LoadTextDraws();
        return 1;
}
public OnFilterScriptExit(){
KillTimer(TimerA);
KillTimer(TimerB);
KillTimer(TimerC);
return 1;
}
Float:GetPlayerTheoreticAngle(i) // By Luby
{
        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[0])),2)+floatpower(floatabs(floatsub(y,ppos[1])),2));
               
                if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);}
               
                if(x>ppos[0]){tmp3=x-ppos[0];}else{tmp3=ppos[0]-x;}
                if(y>ppos[1]){tmp4=y-ppos[1];}else{tmp4=ppos[1]-y;}
               
                if(ppos[1]>y && ppos[0]>x){
                   sin = asin(tmp3/dis);
                    MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
                }
               
                if(ppos[1]<y && ppos[0]>x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatsub(floatadd(sin, 180), 180.0);
                }
               
                if(ppos[1]<y && ppos[0]<x){
                    sin = acos(tmp4/dis);
                    MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
                }
               
                if(ppos[1]>y && ppos[0]<x){
                    sin = asin(tmp3/dis);
                    MindAngle = floatadd(sin, 180);
                }
        }
       
        if(MindAngle == 0.0){return angle2;}else{return MindAngle;}
}
public DriftExit(playerid){ // By Luby
        PlayerDriftCancellation[playerid] = 0;
       
 ////////////////// by Abhinav ///////////////////
        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){ // By Luby
        new Float:Ang;
        if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang);
        return Ang;
}
public Drift(){ // By Luby
        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){
                    ///////////// by Abhinav ////////////////////
                    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(){ // By Luby
        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){ // By Luby
        new str[256];
        format(str, 256, \"%.0f\", val);
        return todec(str);
}
todec(str[]){ // By Luby
        return strval(str);
}
LoadTextDraws(){ // by Abhinav
TDLabels[0]=TextDrawCreate(Label_X,TD_Y,\"Drift Points\");
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,\"Drift 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,\"Drift Cash\");
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=TextDrawCreate(Value_X,TD_Y+20,\"0\");
TextDrawColor(TDValueDrift,COLOR_Value);
TextDrawSetShadow(TDValueDrift,0);
TextDrawSetOutline(TDValueDrift,1);
TextDrawLetterSize(TDValueDrift,0.5,2);
TextDrawBackgroundColor(TDValueDrift,COLOR_ValueOut);
TextDrawFont(TDValueDrift,3);
TDValueBonus=TextDrawCreate(Value_X,TD_Y+70,\"X1\");
TextDrawColor(TDValueBonus,COLOR_Value);
TextDrawSetShadow(TDValueBonus,0);
TextDrawSetOutline(TDValueBonus,1);
TextDrawLetterSize(TDValueBonus,0.5,2);
TextDrawBackgroundColor(TDValueBonus,COLOR_ValueOut);
TextDrawFont(TDValueBonus,3);
TDValueCash=TextDrawCreate(Value_X,TD_Y+120,\"$0\");
TextDrawColor(TDValueCash,COLOR_Value);
TextDrawSetShadow(TDValueCash,0);
TextDrawSetOutline(TDValueCash,1);
TextDrawLetterSize(TDValueCash,0.5,2);
TextDrawBackgroundColor(TDValueCash,COLOR_ValueOut);
TextDrawFont(TDValueCash,3);
}
return 1;
}
public CheckPlayerState(){ //by Abhinav
new i,cs;
for(i=0;i<=MAX_PLAYERS;i++){
    cs=GetPlayerState(i);
    if(DriftMode && cs==PLAYER_STATE_DRIVER && DriftPointsNow>70){
        new Float:h;
        GetVehicleHealth(GetPlayerVehicleID(i),h);
        if(h<HealthInit){
           KillTimer(DriftTimer);
           DriftExit(i);
           GameTextForPlayer(i,\"~n~~n~~n~~n~~n~~n~~n~~r~Boom\",800,5);
           DriftMode=false;
   }
}
    if(cs==PLAYER_STATE_DRIVER && DriftMode==false){
        if(GetVType(GetPlayerVehicleID(i))){
        DriftMode=true;
        GetVehicleHealth(GetPlayerVehicleID(i),HealthInit);
        AutoFixBool=false;
        DriftTimer=SetTimerEx(\"Drift\", 200, true, \"i\", i);
   }
}
else if(cs!=PLAYER_STATE_DRIVER && DriftMode==true){
    KillTimer(DriftTimer);
    DriftMode=false;
    AutoFixBool=true;
}
else{}
}
return 1;
}
public AutoFix(){ // By abhinav
new i;
for(i=0;i<=MAX_PLAYERS;i++){
if(AutoFixBool && IsPlayerInAnyVehicle(i)){
   SetVehicleHealth(GetPlayerVehicleID(i),HealthInit);
}
}
}
GetVType(vid){ // By Abhinav
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==modelid) return 1;
}
for(i=0;i<25;i++){
    if(Industrial==modelid) return 1;
}
for(i=0;i<7;i++){
    if(LowRider==modelid) return 1;
}
for(i=0;i<12;i++){
    if(OffRoad==modelid) return 1;
}
for(i=0;i<19;i++){
    if(Service==modelid) return 1;
}
for(i=0;i<35;i++){
    if(Saloon==modelid) return 1;
}
for(i=0;i<20;i++){
    if(Sports==modelid) return 1;
}
for(i=0;i<5;i++){
    if(Wagons==modelid) return 1;
}
return 0;
}

45
Segítségkérés / strtok
« Dátum: 2012. szeptember 22. - 14:51:35 »
Idézetet írta: md12 date=1348310536\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27778\" data-ipsquote-contentclass=\"forums_Topic

stock GetPlayerNameEx(id)
{
new name[24];
GetPlayerName(id, name, 24);
return name;
}

 
ez van nekem stock
strtok szó nem szerepel egész modba xd
 
De valamelyik include fájlba benne lehet. Nézd meg azokat is.

Oldalak: 1 2 [3] 4 5 ... 117
SimplePortal 2.3.7 © 2008-2024, SimplePortal