WTFCS Community | Gaming community @ since 2011

Full Version: Comanda /fly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Autor: xLinix69

Pentru inceput aveti nevoie de un include.
Code:
#include <fly>
Il gasiti aici: You are not allowed to view links. Register or Login to view.

Acum vom face comanda:

Code:
CMD:fly(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te comenctezi."); // aici verificam daca esti conectat
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] >= 1) // aici punem nivelul de admin necesar pentru a folosii comanda.
        {
            new sendername[30],string[256];
            if(flymode[playerid] == 0)
            {
                GetPlayerName(playerid, sendername, sizeof(sendername)); // aici obtinem numele adminuui.
                togfind[playerid] = 0;
                flymode[playerid] = 1;
                format(string,sizeof(string),"{DFF230}%s este acum in modul fly-mode.", sendername);
                ABroadCast(COLOR_ORANGE,string,1);
                InitFly(playerid);
                StartFly(playerid);
                SetPlayerHealthEx(playerid, 10000000); // aici setam hp-ul.
            }
            else
            {
                GetPlayerName(playerid, sendername, sizeof(sendername)); // iar de aici oprim fly-ul.
                togfind[playerid] = 1;
                flymode[playerid] = 0;
                format(string,sizeof(string),"{F89AD6}Ai oprit fly-mode-ul", sendername);
                SCM(playerid, COLOR_GREEN, string);
                StopFly(playerid);
                SetPlayerHealthEx(playerid, 100); //
            }
        }
        else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
    }
    return 1;
}