Jump to content

Fly


david1995

Recommended Posts

Am o problema fly , nu functioneaza imi scrie ca am pornit fly , viata tot , dar nu pot zbura 

Sau daca zboara nu il mai pot oprii.

Am #include <fly>

Comanda

Quote

CMD:flymode(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Contul tau este blocat. Foloseste /loginpin pentru al debloca. Daca nu ai un pin foloseste /addpin.");
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            new sendername[30],string[256];
            if(PlayerInfo[playerid][pFlyMode] == 0)
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[playerid][pFlyMode] = 1;
                format(string,sizeof(string),"%s is now in flymode.", sendername);
                SetPlayerHealth(playerid, 500000.0);
            }
            else
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[playerid][pFlyMode] = 0;
                format(string,sizeof(string),"%s has stopped flymode.", sendername);
                StopFly(playerid);
                SetPlayerHealth(playerid, 100);
            }
            ABroadCast(COLOR_YELLOW,string,1);
        }
        else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
    }
    return 1;
}

Erori compliere

Quote

(50254) : warning 203: symbol is never used: "InitFly"
(50254) : warning 203: symbol is never used: "StartFly"
(50254) : warning 203: symbol is never used: "StopFly"

 

Link to comment
Share on other sites

Banuiesc ca trebuie inlocuit cu asta 

 

if(PlayerInfo[playerid][pFlyMode] == 0)
            {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                PlayerInfo[playerid][pFlyMode] = 1;

               InitFly (playerid);

               StartFly (playerid);
                format(string,sizeof(string),"%s is now in flymode.", sendername);
                SetPlayerHealth(playerid, 500000.0);
            }

  • Upvote 1

 

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

Nu inteleg de ce iti da eroarea din moment ce  tu folosesti variabila, daca te deranjeaza pune asta   #pragma unused StopFly

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
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.