Jump to content

Deschidere/Inchidere poarta LSPD


SrYu

Recommended Posts

Am o problema cu codurile pentru poarta, sa se deschida si pe urma sa se inchida. Am urmarit tutorial lui WiDuAlKdaca sunteti la inceput de drum va recomand sa urmariti tutorialele lui, chiar m au ajutat mult, m am folosit de tutorialul pentru factiuni si am ajuns la partea cu poarta. Am motificat ce trebuie, pus unde trebuie, dar imi apar multe erori:

C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(686) : error 055: start of function body without function header
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(688) : error 010: invalid function or declaration
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(690) : error 055: start of function body without function header
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(692) : error 010: invalid function or declaration
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(694) : error 055: start of function body without function header
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(696) : error 010: invalid function or declaration
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(702) : error 055: start of function body without function header
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(704) : error 021: symbol already defined: "MoveObject"
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(714) : error 021: symbol already defined: "SetTimer"
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(716) : error 021: symbol already defined: "SendClientMessage"
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(718) : error 054: unmatched closing brace ("}")
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(720) : error 054: unmatched closing brace ("}")
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(722) : error 054: unmatched closing brace ("}")
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(724) : error 010: invalid function or declaration
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(726) : error 054: unmatched closing brace ("}")
C:\Users\eSrYu\Desktop\server samp\gamemodes\gm.pwn(750) : error 010: invalid function or declaration

Codul este: 

{

        if (newkeys & KEY_CROUCH )

        {

            if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)

            {

                if(IsPlayerInRangeOfPoint(playerid, 15, 1588.5, -1637.8, 13.6)

                {

                    MoveObject(GatePD1, 1588.6, -1638.0, 6.9, 5.0, 0.00000, 0.00000, 0.00000);

                   SetTimer("MoveGatePd1",5000,0);

                    SendClientMessage(playerid,-1,"Ai deschis poarta 5 secunde!");

                }

            }

        }

        return 1;

    }

    forward MoveGatePd1();

    public MoveGatePd1()

    {

        MoveObject(GatePD1,1588.5, -1637.8, 13.6, 5.0, 0.00000, 0.00000, 0.00000);

           return 1;

    }       

Inainte de asta am mai facut si partea cu intrarile, de afara in politie, in sala, etc, tot dupa tutorialul acesta.

https://www.sa-mp.ro/forums/topic/20538-cum-sa-creezi-o-noua-factiune-de-la-0part-1/ Acesta este link-ul de la partea 1.

Toate merg ca pe roate, aici m am blocat. Am facut si prin CMD sa se deschida poarta, dar altfel ii cand apesi un buton. Sper sa fie o rezolvare si multumesc anticipat! :D

 

Link to comment
Share on other sites

if (newkeys & KEY_CROUCH )

        {

            if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)

            {

                if(IsPlayerInRangeOfPoint(playerid, 15, 1588.5, -1637.8, 13.6)

                {

                    MoveObject(GatePD1, 1588.6, -1638.0, 6.9, 5.0, 0.00000, 0.00000, 0.00000);

                   SetTimer("MoveGatePd1",5000,0);

                    SendClientMessage(playerid,-1,"Ai deschis poarta 5 secunde!");

                }

        }

        return 1;

        }

 

si forward MoveGatePd1(); si public MoveGatePd1() le muti de exemplu la sfarsitul gamemodului

aqpUjAc.png

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.