Jump to content
  • 0

Problema /flly


InceMan

Question

Problema intalnita (descriere): nu merge sa zbor cu fly ce trebuie sa fac sa pot zbura cu ea in ceruri
Ero(area / rile) / warning-(ul / urile):nu sunt
Liniile de cod / sursa / script-ul(obligatoriu):

if (strcmp(cmd, "/fly", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerData[playerid][pAdmin] >= 2)
            {
                new Float:px, Float:py, Float:pz, Float:pa;
                GetPlayerFacingAngle(playerid,pa);
                if(pa >= 0.0 && pa <= 22.5) //n1
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px, py+30, pz+5);
                }
                if(pa >= 332.5 && pa < 0.0) //n2
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px, py+30, pz+5);
                }
                if(pa >= 22.5 && pa <= 67.5) //nw
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px-15, py+15, pz+5);
                }
                if(pa >= 67.5 && pa <= 112.5) //w
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px-30, py, pz+5);
                }
                if(pa >= 112.5 && pa <= 157.5) //sw
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px-15, py-15, pz+5);
                }
                if(pa >= 157.5 && pa <= 202.5) //s
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px, py-30, pz+5);
                }
                if(pa >= 202.5 && pa <= 247.5)//se
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px+15, py-15, pz+5);
                }
                if(pa >= 247.5 && pa <= 292.5)//e
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px+30, py, pz+5);
                }
                if(pa >= 292.5 && pa <= 332.5)//e
                {
                    GetPlayerPos(playerid, px, py, pz);
                    SetPlayerPosEx(playerid, px+15, py+15, pz+5);
                }
            }
            else
            {
                SendError(playerid,cmd);
            }
        }
        return 1;
    }


Imagini / Video (optional): nu am am-i facut
Ati incercat sa rezolvati singur?: da

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

aceasta comanda nu este un sistem de fly este doar o comanda de genul slap, cea ce vrei tu este un sistem de zbor

http://forum.sa-mp.com/showthread.php?t=315704

uite aici incearca sa vezi daca merge

Edited by Mister
  • Upvote 2

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

multumesc

 

daca il trec in  filterscripts si il salvez in config oare merge ca mie nu imi merge cu variantele CMD:

11 minutes ago, Mister said:

aceasta comanda nu este un sistem de fly este doar o comanda de genul slap, cea ce vrei tu este un sistem de zbor

http://forum.sa-mp.com/showthread.php?t=315704

uite aici incearca sa vezi daca merge

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

Incercarea moarte nu are, deci incearca sa il pui in filterscript , apoi numele filterscriptului in server.cfg la linia filterscripts si fa in asa fel in comanda de fly incat doar admini adica cine e logat cu rcon sa poate accesa flymodeul

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Este un filterscript daca vrei un asemnea script "avansat" trebuie sa ai si cunostintele necesare pentru al pune in gm.

Alucati-va sa faceti pentru nivelul vostru ceva simplu cate putin cate putin, asa se invata, ca daca cineva vrea sa invete scripting nu se apuca din prima sa faca un sistem de case. 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

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.