Jump to content

Question

Posted

Buna ziua samp.ro

am si eu un script automat car enu e facut de mine e din GM

Asa e el si as vrea sa il modific un pic imi puteti da niste indicatii

[pawn]forward Toll();

public Toll()

{

// Loop through all players

    for(new playerid; playerid < MAX_PLAYERS; playerid++)

{

// If the player isn't connected, skip to the next player

        if(APlayerData[playerid][LoggedIn] == false) continue;

// Check if the player is the driver of a vehicle

if (GetPlayerVehicleSeat(playerid) == 0)

{

// Loop through all toll-gates

for (new TollGate; TollGate < MAX_TOLLGATES; TollGate++)

{

// Check if this toll-gate exists

if (ATollGates[TollGate][GateID] != 0)

{

    // Check if the player is in range of the tollgate

        if(IsPlayerInRangeOfPoint(playerid, 7.5, ATollGates[TollGate][CloseX], ATollGates[TollGate][CloseY], ATollGates[TollGate][CloseZ]))

        {

// Check if the toll-gate is closed

            if(ATollGates[TollGate][GateStatus] == 0)

{

    // Open the gate

                MoveObject(ATollGates[TollGate][GateID], ATollGates[TollGate][OpenX], ATollGates[TollGate][OpenY], ATollGates[TollGate][OpenZ], 3.0);

// Set status to OPEN

                ATollGates[TollGate][GateStatus] = 1;

                // Let the player pay the toll

                RewardPlayer(playerid, -ATollGates[TollGate][TollPrice], 0);

                new string[50];

                format(string, sizeof(string), TXT_PlayerPaysToll, ATollGates[TollGate][TollPrice]);

                GameTextForPlayer(playerid, string, 3000, 4);

                // Start a timer that closes the gate after 5 seconds

                SetTimerEx("CloseGate", 5000, false, "i", TollGate);

}

        }

}

}

}

    }

}

forward CloseGate(TollGate);

public CloseGate(TollGate)

{

    // Close the gate

MoveObject(ATollGates[TollGate][GateID], ATollGates[TollGate][CloseX], ATollGates[TollGate][CloseY], ATollGates[TollGate][CloseZ], 3.0);

// Set status to CLOSED

ATollGates[TollGate][GateStatus] = 0;

}

[/pawn]

de aici o adaug

[pawn]AddTollGate(3578, 1801.00, 692.66, 10.00, 1801.00, 692.66, 15.00, 0.0, 0.0, 350.25, 30);[/pawn]

si mai este chesti aceasta

[pawn]// This function is used to add toll-gates to the map

AddTollGate(GateModel, Float:OX, Float:OY, Float:OZ, Float:CX, Float:CY, Float:CZ, Float:RX, Float:RY, Float:RZ, TollMoney)

{

// Loop through all tollgates

for (new TollGate; TollGate < MAX_TOLLGATES; TollGate++)

{

// Check if this is an empty entry

if (ATollGates[TollGate][GateID] == 0)

{

// Create a new object for the toll-gate in it's closed status

ATollGates[TollGate][GateID] = CreateObject(GateModel, CX, CY, CZ, RX, RY, RZ);

// Set data

ATollGates[TollGate][TollPrice] = TollMoney; // Set the price to pay for passing the toll-gate

ATollGates[TollGate][GateStatus] = 0; // Set the status to CLOSED

ATollGates[TollGate][OpenX] = OX; // Save the OpenX coordinates

ATollGates[TollGate][OpenY] = OY; // Save the OpenY coordinates

ATollGates[TollGate][OpenZ] = OZ; // Save the OpenZ coordinates

ATollGates[TollGate][CloseX] = CX; // Save the CloseX coordinates

ATollGates[TollGate][CloseY] = CY; // Save the CloseY coordinates

ATollGates[TollGate][CloseZ] = CZ; // Save the CloseZ coordinates

break; // Stop the for-loop

}

}

}[/pawn]

Tin sa precizes ca sunt in include diferite aceste chestii

Bun inteleg cum functioneaza dar eu vreau sa se deschida in rotatie pentru a adauga bariera de aceea cu alb si rosu

acest script e facut sa se deschida in sus si in jos eu vreau stil rotatie

ma puteti ajuta?

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

9 answers to this question

Recommended Posts

Posted

nimeni  :((

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

Stii eu tot nu imi dau seama ce face acest script si ce vrei tu sa faci.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

scriptul acesta face ca sa se miste un obiect in sus si in jos si sa ia bani cand treci prin acel loc si sa lasa obiectul in jos (automat) si se ridica automat

dar eu vreau sa il pun pe rotatie adica sa nu se mai ridice in sus si in jos sa fac rotatie ca o bariera :)

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

scriptul acesta face ca sa se miste un obiect in sus si in jos si sa ia bani cand treci prin acel loc si sa lasa obiectul in jos (automat) si se ridica automat

dar eu vreau sa il pun pe rotatie adica sa nu se mai ridice in sus si in jos sa fac rotatie ca o bariera :)

Da si apa e uda...:D explica si tu mai bine ca nu se intelege ce vrei sa spui :))

SiMpLe.

Posted

Da si apa e uda...:D explica si tu mai bine ca nu se intelege ce vrei sa spui :))

Mai facut sa fac poze si mai starnit in mai multe privinte daca am puteti ajuta :)) :D

Deci eu am asa sistemu automat

samp049bj.png

si vreau sa il fac asa

[img width=500 height=281] samp044jl.png

Dar pe langa astea mai sunt interesat cum a facut sa se vada la fuel asa cu verde ma omoara chesti aia si la acel textdraw cum a adaugat chestia aia porocalie cu orice ma puteti ajuta e bine primit :X

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

serios de atatea zile si nimeni?

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

uite aici daca vrei sa o si rotesti ai cativa parametri optionali.

Ce trebuie sa faci.

1.Sa pui variabile noi EX:

ATollGates[TollGate][r_OPENX] = rCX; // Save the rCloseX coordinates

ATollGates[TollGate][r_OPENY] = rCY; // Save the rCloseY coordinates

ATollGates[TollGate][r_OPENZ] = rCZ; // Save the rCloseZ coordinates

2.Sa modifici functia MoveObject cu parametrii si variabilele noi.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

[pawn]C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(572) : error 017: undefined symbol "r_OPENX"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(573) : error 017: undefined symbol "r_OPENY"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(574) : error 017: undefined symbol "r_OPENZ"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(575) : error 017: undefined symbol "r_CloseX"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(576) : error 017: undefined symbol "r_CloseY"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(577) : error 017: undefined symbol "r_CloseZ"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(559) : warning 203: symbol is never used: "OZ"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(559) : warning 203: symbol is never used: "OY"

C:\Users\KyLLeR\Desktop\JP trucking\pawno\include\PPC_GameModeInit.inc(559) : warning 203: symbol is never used: "OX"[/pawn]

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

in fine lasati-o balta :-j raman cu el asa

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.