Szerző Téma: Filescript fontos  (Megtekintve 1063 alkalommal)

Filescript fontos
« Dátum: 2012. szeptember 12. - 17:12:08 »
0 Show voters
Sziasztok a Scriptekkel lenne problémám...
A szerverem miért csak 16 filescriptet tölt be?és ezt hogy lehetne megcsinálni hogy többet is betöltsön....
A válaszokat várom.

Nem elérhető Mike.

  • 720
    • Profil megtekintése
Filescript fontos
« Válasz #1 Dátum: 2012. szeptember 12. - 17:13:56 »
0 Show voters
Úgy tudom erre nincs lehetõséged.
Rakd bele a játékmódodba azt ami nem igazán fontos, a fontosakat pedig hagyd meg fs-ként.

Filescript fontos
« Válasz #2 Dátum: 2012. szeptember 12. - 17:17:28 »
0 Show voters
valami egyszerûbb megoldás?

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Filescript fontos
« Válasz #3 Dátum: 2012. szeptember 12. - 17:25:43 »
0 Show voters
Nincs.
Annyit tudsz, csak hogy lehetõleg az összes scriptet beteszed a játék gm be, és akkor meg van oldva.

Filescript fontos
« Válasz #4 Dátum: 2012. szeptember 12. - 17:28:20 »
0 Show voters
És hogy tudnám megcsinálni? :D kezdõ vagyok....

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Filescript fontos
« Válasz #5 Dátum: 2012. szeptember 12. - 17:47:29 »
0 Show voters
Másold be ide az egyik kisebb méretû scripted.

Filescript fontos
« Válasz #6 Dátum: 2012. szeptember 12. - 18:03:31 »
0 Show voters
Ittvan:
 

//------------------------------------------------------------------------------
//
//   TowCars Filter Script v1.0
//   Designed for SA-MP v0.2.2
//
//   Created by zeruel_angel
//
//------------------------------------------------------------------------------
#include <a_samp>
new TowTruckers=0;
new IsTowTrucker[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n TowCars Filter Script v1.0 Loading...\\n**********************\\n      (Zeruel_Angel)\\n\");
print(\"TowCars Filter Script fully Loaded\\n**********************************\\n\\n\");
}
//------------------------------------------------------------------------------------------------------
public OnFilterScriptExit()
{
    print(\"\\n TowCars Script UnLoaded\\n********************************************\\n\\n\");
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if   (newstate==PLAYER_STATE_DRIVER)
    {
if   (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
        {
        IsTowTrucker[playerid]=1;
        TowTruckers++;
   SendClientMessage(playerid,0xFFFF00AA,\"You can use the ACTION KEY to Tow cars\");
    }
else
    {
    if   (TowTruckers>0)
        {
       SendClientMessage(playerid,0xFFFF00AA,\"If you have a problem with your car, use /TowMe to call a TowTruker\");
       }
    }
    }
if    ((newstate==PLAYER_STATE_ONFOOT)&&(IsTowTrucker[playerid]==1))
    {
    IsTowTrucker[playerid]=0;
    TowTruckers--;
    }
if    ((newstate==PLAYER_STATE_PASSENGER)&&(TowTruckers>0))
        {
       SendClientMessage(playerid,0xFFFF00AA,\"If you have a problem with your car, use /TowMe to call a TowTruker\");
       }
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
        {
        SendClientMessage(playerid,0xFFFF00AA,\"trying to tow a car\");
   new Float:pX,Float:pY,Float:pZ;
   GetPlayerPos(playerid,pX,pY,pZ);
   new Float:vX,Float:vY,Float:vZ;
   new Found=0;
   new vid=0;
   while((vid<MAX_VEHICLES)&&(!Found))
               {
               vid++;
               GetVehiclePos(vid,vX,vY,vZ);
               if  ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
                   {
                   Found=1;
                   if   (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                       {
                       DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                       }
                   AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
                   SendClientMessage(playerid,0xFFFF00AA,\"Car towed!\");
                   }
                }
   if  (!Found)
       {
       SendClientMessage(playerid,0xFFFF00AA,\"There is no car in range.\");
       }
    }
    }
}
//------------------------------------------------------------------------------------------------------
public OnPlayerDisconnect(playerid)
{
if    (IsTowTrucker[playerid]==1)
    {
    IsTowTrucker[playerid]=0;
    TowTruckers--;
    }
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerCommandText(playerid,cmdtext[])
{
if   (strcmp(cmdtext, \"/TowMe\", true)==0)
{
if  (TowTruckers==0)
    {
    SendClientMessage(playerid,0xFFFF00AA,\"Sorry there isn\'t any TowTrucker Available at the moment\");
    return 1;
    }
        SendClientMessage(playerid,0xFFFF00AA,\"TowTruckers has been told of your situation, just wait.\");
        SendClientMessage(playerid,0xFFFF00AA,\"REMEMBER: Your car can\'t be towed if you are sitting as the driver\");
new pName[MAX_PLAYER_NAME];
new msg[256];
format(msg,sizeof(msg),\"*** %s (id:&d) Need to be Towed ***\",pName,playerid);
GetPlayerName(playerid,pName,sizeof(pName));
for (new i=0;i<MAX_PLAYERS;i++)
    {
    if    (IsTowTrucker==1)
        {
        SendClientMessage(i,0xFFFF00AA,msg);
        }
    }
return 1;
}
return 0;
}

 
[gmod]Használd a bb kódokat.[/gmod]
« Utoljára szerkesztve: 2012. szeptember 12. - 22:28:30 írta ɐʞzssǝlosz »

Filescript fontos
« Válasz #7 Dátum: 2012. szeptember 13. - 16:57:50 »
0 Show voters
Idézetet írta: DarkRobe date=1347465811\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27606\" data-ipsquote-contentclass=\"forums_Topic
Ittvan:
 

//------------------------------------------------------------------------------
//
//   TowCars Filter Script v1.0
//   Designed for SA-MP v0.2.2
//
//   Created by zeruel_angel
//
//------------------------------------------------------------------------------
#include <a_samp>
new TowTruckers=0;
new IsTowTrucker[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n TowCars Filter Script v1.0 Loading...\\n**********************\\n      (Zeruel_Angel)\\n\");
print(\"TowCars Filter Script fully Loaded\\n**********************************\\n\\n\");
}
//------------------------------------------------------------------------------------------------------
public OnFilterScriptExit()
{
    print(\"\\n TowCars Script UnLoaded\\n********************************************\\n\\n\");
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if   (newstate==PLAYER_STATE_DRIVER)
    {
if   (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
        {
        IsTowTrucker[playerid]=1;
        TowTruckers++;
   SendClientMessage(playerid,0xFFFF00AA,\"You can use the ACTION KEY to Tow cars\");
    }
else
    {
    if   (TowTruckers>0)
        {
       SendClientMessage(playerid,0xFFFF00AA,\"If you have a problem with your car, use /TowMe to call a TowTruker\");
       }
    }
    }
if    ((newstate==PLAYER_STATE_ONFOOT)&&(IsTowTrucker[playerid]==1))
    {
    IsTowTrucker[playerid]=0;
    TowTruckers--;
    }
if    ((newstate==PLAYER_STATE_PASSENGER)&&(TowTruckers>0))
        {
       SendClientMessage(playerid,0xFFFF00AA,\"If you have a problem with your car, use /TowMe to call a TowTruker\");
       }
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
        {
        SendClientMessage(playerid,0xFFFF00AA,\"trying to tow a car\");
   new Float:pX,Float:pY,Float:pZ;
   GetPlayerPos(playerid,pX,pY,pZ);
   new Float:vX,Float:vY,Float:vZ;
   new Found=0;
   new vid=0;
   while((vid<MAX_VEHICLES)&&(!Found))
               {
               vid++;
               GetVehiclePos(vid,vX,vY,vZ);
               if  ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
                   {
                   Found=1;
                   if   (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                       {
                       DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                       }
                   AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
                   SendClientMessage(playerid,0xFFFF00AA,\"Car towed!\");
                   }
                }
   if  (!Found)
       {
       SendClientMessage(playerid,0xFFFF00AA,\"There is no car in range.\");
       }
    }
    }
}
//------------------------------------------------------------------------------------------------------
public OnPlayerDisconnect(playerid)
{
if    (IsTowTrucker[playerid]==1)
    {
    IsTowTrucker[playerid]=0;
    TowTruckers--;
    }
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerCommandText(playerid,cmdtext[])
{
if   (strcmp(cmdtext, \"/TowMe\", true)==0)
{
if  (TowTruckers==0)
    {
    SendClientMessage(playerid,0xFFFF00AA,\"Sorry there isn\'t any TowTrucker Available at the moment\");
    return 1;
    }
        SendClientMessage(playerid,0xFFFF00AA,\"TowTruckers has been told of your situation, just wait.\");
        SendClientMessage(playerid,0xFFFF00AA,\"REMEMBER: Your car can\'t be towed if you are sitting as the driver\");
new pName[MAX_PLAYER_NAME];
new msg[256];
format(msg,sizeof(msg),\"*** %s (id:&d) Need to be Towed ***\",pName,playerid);
GetPlayerName(playerid,pName,sizeof(pName));
for (new i=0;i<MAX_PLAYERS;i++)
    {
    if    (IsTowTrucker==1)
        {
        SendClientMessage(i,0xFFFF00AA,msg);
        }
    }
return 1;
}
return 0;
}

 
Használd a bb kódokat.
 
Gamemode -d elejére az include -k alá:
 
     new TowTruckers=0;
    new IsTowTrucker[MAX_PLAYERS];

 
public OnPlayerStateChange alá:
 
             {
            if      (newstate==PLAYER_STATE_DRIVER)
                {
                    if      (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
                    {
                    IsTowTrucker[playerid]=1;
                    TowTruckers++;
                            SendClientMessage(playerid,0xFFFF00AA,\"You can use the ACTION KEY to Tow cars\");
                        }
                    else
                        {
                        if  (TowTruckers>0)
                            {
                            SendClientMessage(playerid,0xFFFF00AA,\"If you have a problem with your car, use /TowMe to call a TowTruker\");
                            }
                        }
                }
            if      ((newstate==PLAYER_STATE_ONFOOT)&&(IsTowTrucker[playerid]==1))
                {
                IsTowTrucker[playerid]=0;
                TowTruckers--;
                }
            if      ((newstate==PLAYER_STATE_PASSENGER)&&(TowTruckers>0))
            {
            SendClientMessage(playerid,0xFFFF00AA,\"If you have a problem with your car, use /TowMe to call a TowTruker\");
            }
            return 1;
            }

 
public OnPlayerKeyStateChange alá:
 
             {
            if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
                {
                if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
                    {
                    SendClientMessage(playerid,0xFFFF00AA,\"trying to tow a car\");
                            new Float:pX,Float:pY,Float:pZ;
                            GetPlayerPos(playerid,pX,pY,pZ);
                            new Float:vX,Float:vY,Float:vZ;
                            new Found=0;
                            new vid=0;
                            while((vid<MAX_VEHICLES)&&(!Found))
                                    {
                                    vid++;
                                    GetVehiclePos(vid,vX,vY,vZ);
                                    if  ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
                                        {
                                        Found=1;
                                        if  (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                                            {
                                            DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                                            }
                                        AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
                                        SendClientMessage(playerid,0xFFFF00AA,\"Car towed!\");
                                        }
                            }
                            if  (!Found)
                                {
                                SendClientMessage(playerid,0xFFFF00AA,\"There is no car in range.\");
                                }
                        }
                }
            }

 
public OnPlayerDisconnect alá:
 
             {
            if      (IsTowTrucker[playerid]==1)
                {
                IsTowTrucker[playerid]=0;
                TowTruckers--;
                }
            return 1;
            }

 
public OnPlayerCommandText alá:
 
             {
            if      (strcmp(cmdtext, \"/TowMe\", true)==0)
                    {
                    if  (TowTruckers==0)
                        {
                        SendClientMessage(playerid,0xFFFF00AA,\"Sorry there isn\'t any TowTrucker Available at the moment\");
                        return 1;
                        }
            SendClientMessage(playerid,0xFFFF00AA,\"TowTruckers has been told of your situation, just wait.\");
            SendClientMessage(playerid,0xFFFF00AA,\"REMEMBER: Your car can\'t be towed if you are sitting as the driver\");
                    new pName[MAX_PLAYER_NAME];
                    new msg[256];
                    format(msg,sizeof(msg),\"*** %s (id:&d) Need to be Towed ***\",pName,playerid);
                    GetPlayerName(playerid,pName,sizeof(pName));
                    for (new i=0;i<MAX_PLAYERS;i++)
                        {
                        if  (IsTowTrucker==1)
                            {
                            SendClientMessage(i,0xFFFF00AA,msg);
                            }
                        }
                    return 1;
                    }
            return 0;
            }

 
Dexter

Filescript fontos
« Válasz #8 Dátum: 2012. szeptember 13. - 17:02:15 »
0 Show voters
Szia köszönöm ez nagyon jó leirás de kérlek az egészet egybe írd ide mert még sok dolgom van és a szerverem most készül...még mennem kell haverhoz hogy segítsen meg ilyenek elõre is köszönöm és ha még ide írnád hogy lehet + adni akkor azt is adok

Nem elérhető RolePlay

  • 2100
    • Profil megtekintése
Filescript fontos
« Válasz #9 Dátum: 2012. szeptember 13. - 17:04:12 »
0 Show voters
Megcsinálta... , mit csináljon még ezen ? :) Csak a módba kell tenned, oda írta, hogy mit hova..

Filescript fontos
« Válasz #10 Dátum: 2012. szeptember 13. - 17:20:43 »
0 Show voters
ja oks
 ;D

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Filescript fontos
« Válasz #11 Dátum: 2012. szeptember 13. - 17:28:33 »
0 Show voters
A samp készítõk max 17 filtersciptet raktak be akkor az lesz a max is mást nem lehet tenni csak a módba belefirkálni  :shurg:  :-[

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal