[Include] JFS Include v2.0
#1

Entгo, Jб que Eu Pedi Pra Exclui a 1.0 por culpa OFF Topic. Atualizei o Mais Rбpido Possivel ^^

Funзхes


pawn Код:
native RestartServidor();
native Congelar(playerid);
native Descongelar(playerid);
native Dia();
native Noite();
native TremerTela(playerid);
native PararTremerTela(playerid);
native SalvarLocal(playerid);
native IrLocal(playerid);
native PlayersAFK(playerid);
native EntrarAFK(playerid);
native SairAFK(playerid);
native PlayersAFK(playerid);
native SetarPos(playerid, Float:x, Float:y, Float:z, Float:ang);
native DarArmas(playerid, Arma1, Ballas1, Arma2, Ballas2, Arma3, Ballas3, Arma4, Ballas4);
native LimparLinhas(playerid, Linhas);
native LimparLinhaAll();
native BanAll();
native KickAll();
native JogadoresOnline();
native MudarNick(playerid, const NickDesejado[]);
native DarCrash(playerid);
native Jetpack(playerid);
native PegarNome(playerid);
native EquiparVidaColete(playerid, Float:health, Float:armour);
native CarregarMapa(playerid);
Exemplos de Uso

pawn Код:
if (strcmp("/restartsv", cmdtext, true) == 0)
{
    RestartServidor();
    return true;
}
if (strcmp("/mecongelar", cmdtext, true) == 0)
{
    Congelar(playerid);
    return true;
}
if (strcmp("/medescongelar", cmdtext, true) == 0)
{
    Descongelar(playerid);
    return true;
}
if (strcmp("/dia", cmdtext, true) == 0)
{
    Dia();
    return true;
}
if (strcmp("/noite", cmdtext, true) == 0)
{
    Noite();
    return true;
}
if (strcmp("/tremertela", cmdtext, true) == 0)
{
    TremerTela(playerid);
    return true;
}
if (strcmp("/parartremer", cmdtext, true) == 0)
{
    PararTremerTela(playerid);
    return true;
}
if (strcmp("/salvarlocal", cmdtext, true) == 0)
{
    SalvarLocal(playerid);
    return true;
}
if (strcmp("/irlocal", cmdtext, true) == 0)
{
    IrLocal(playerid);
    return true;
}
if (strcmp("/entrarafk", cmdtext, true) == 0)
{
    EntrarAFK(playerid);
    return true;
}
if (strcmp("/sairafk", cmdtext, true) == 0)
{
    SairAFK(playerid);
    return true;
}
if (strcmp("/playersafk", cmdtext, true) == 0)
{
    PlayersAFK(playerid);
    return true;
}
if (strcmp("/pegararmas", cmdtext, true) == 0)
{
    DarArmas(playerid, 24, 100, 25, 100, 30, 100, 40, 100);
    return true;
}
if (strcmp("/limparlinha", cmdtext, true) == 0)
{
    LimparLinhas(playerid, 5);
    return true;
}
if (strcmp("/limparlinhaAll", cmdtext, true) == 0)
{
    LimparLinhaAll();
    return true;
}
if (strcmp("/playersonline", cmdtext, true) == 0)
{
    new CelulasE[128];
    format(CelulasE, sizeof(CelulasE), "Players Online: (%d/%i)",JogadoresOnline(),  GetMaxPlayers());
    SendClientMessage(playerid, -1, CelulasE);
    return true;
}
if (strcmp("/pegarjetpack", cmdtext, true) == 0)
{
    Jetpack(playerid);
    return true;
}
if (strcmp("/mudarnick", cmdtext, true) == 0)
{
    MudarNick(playerid, "[JFS]JonathanF");
    return true;
}
if (strcmp("/ganharcrash", cmdtext, true) == 0)
{
    DarCrash(playerid);
    return true;
}
if (strcmp("/pegarnick", cmdtext, true) == 0)
{
    new Celulas[128];
    format(Celulas, sizeof(Celulas), "Meu Nick й (( %s ))", PegarNome(playerid));
    SendClientMessage(playerid, -1, Celulas);
    return true;
}
if (strcmp("/pegarvidacolete", cmdtext, true) == 0)
{
    EquiparVidaColete(playerid, 100, 100);
    return true;
}
if (strcmp("/entrar", cmdtext, true) == 0)
{
    CarregarMapa(playerid);
    return true;
}

Click Aqui Para Fazer o Download no 4shared.
Crйditos: Jonathan Feitosa
Crйditos Pelo JogadoresOnline: Ricop
Umas Dicas: Lipe_Stronda.
Visualize
pawn Код:
/* Criado Por Jonathan Feitosa Dia: 21/08/2011

Funзхes:

RestartServidor();
Congelar(playerid);
Descongelar(playerid);
Dia();
Noite();
TremerTela(playerid);
PararTremerTela(playerid);
SalvarLocal(playerid);
IrLocal(playerid);
PlayersAFK(playerid);
EntrarAFK(playerid);
SairAFK(playerid);
PlayersAFK(playerid);
SetarPos(playerid, Float:x, Float:y, Float:z, Float:ang);
DarArmas(playerid, Arma1, Ballas1, Arma2, Ballas2, Arma3, Ballas3, Arma4, Ballas4);
stock LimparLinhas(playerid, Linhas);
stock LimparLinhaAll();
stock BanAll();
stock KickAll();
JogadoresOnline();
MudarNick(playerid, const NickDesejado[]);
DarCrash(playerid);
Jetpack(playerid);
PegarNome(playerid);
EquiparVidaColete(playerid, Float:health, Float:armour);
*/


new Float:SalvarX, Float:SalvarY, Float:SalvarZ, Float:SalvarAngulo;
new CelulaIncJFS[128], NomeIncJFS[MAX_PLAYERS], bool:AFK;

stock RestartServidor()
{
     GameModeExit();
     return true;
}

stock Congelar(playerid)
{
     TogglePlayerControllable(playerid, 0);
     return true;
}
stock Descongelar(playerid)
{
     TogglePlayerControllable(playerid, 1);
     return true;
}
stock Dia()
{
     SetWorldTime(12);
     return true;
}
stock Noite()
{
     SetWorldTime(0);
     return true;
}
stock TremerTela(playerid)
{
     SetPlayerDrunkLevel (playerid, 3000);
     return true;
}
stock PararTremerTela(playerid)
{
     SetPlayerDrunkLevel (playerid, 0);
     return true;
}

stock SalvarLocal(playerid)
{
     GetPlayerPos(playerid, SalvarX, SalvarY, SalvarZ);
     GetPlayerFacingAngle(playerid, Float:SalvarAngulo);
     return true;
}

stock IrLocal(playerid)
{
     SetPlayerPos(playerid, SalvarX, SalvarY, SalvarZ);
     SetPlayerFacingAngle(playerid, Float:SalvarAngulo);
     return true;
}  
stock EntrarAFK(playerid)
{
   if(AFK == true) return SendClientMessage(playerid, -1," Vocк Jб Estб AFK");
   AFK = true;
   TogglePlayerControllable(playerid, 0);
   GetPlayerName(playerid, NomeIncJFS, sizeof(NomeIncJFS));
   format(CelulaIncJFS, sizeof(CelulaIncJFS), "{1E90FF}O Player {7FFFD4}%s {1E90FF}Ficou AFK.", NomeIncJFS);
   SendClientMessageToAll(-1, CelulaIncJFS);
   return true;
}
stock SairAFK(playerid)
{
   if(AFK == false) return SendClientMessage(playerid, -1," Vocк Jб Nгo Estб AFK.");
   AFK = false;
   TogglePlayerControllable(playerid, 1);
   GetPlayerName(playerid, NomeIncJFS, sizeof(NomeIncJFS));
   format(CelulaIncJFS, sizeof(CelulaIncJFS), "{1E90FF}O Player {7FFFD4}%s {1E90FF}Saiu AFK.", NomeIncJFS);
   SendClientMessageToAll(-1, CelulaIncJFS);
   return true;
}

stock PlayersAFK(playerid)
{
   SendClientMessage(playerid, 0xFF0000FF , "~x Players AFK x~");
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
        if(IsPlayerConnected(i))
        {
             if((AFK == true))
             {
                  GetPlayerName(i, NomeIncJFS, sizeof(NomeIncJFS));
                  format(CelulaIncJFS, 128, "%s", NomeIncJFS);
                  SendClientMessage(playerid, -1, CelulaIncJFS);
             }
        }
   }
   return true;
}
stock SetarPos(playerid, Float:x, Float:y, Float:z, Float:ang)
{
     SetPlayerPos(playerid, Float:x, Float:y, Float:z);
     SetPlayerFacingAngle(playerid, Float:ang);
     return true;
}  

stock DarArmas(playerid, Arma1, Ballas1, Arma2, Ballas2, Arma3, Ballas3, Arma4, Ballas4)
{
      GivePlayerWeapon(playerid, Arma1, Ballas1);
      GivePlayerWeapon(playerid, Arma2, Ballas2);
      GivePlayerWeapon(playerid, Arma3, Ballas3);
      GivePlayerWeapon(playerid, Arma4, Ballas4);
      return true;
}

stock LimparLinhas(playerid, Linhas)
{
    for(new i=0; i<Linhas; i++)
    {
       SendClientMessage(playerid, -1, " ");
    }
    return true;
}

stock LimparLinhaAll()
{
    for(new i=0; i<100; i++)
    {
       SendClientMessageToAll(-1, " ");
    }
    return true;
}

stock BanAll()
{
     for(new i = 0; i < MAX_PLAYERS; i++)
    {
       Ban(i);
    }
    return true;
}

stock KickAll()
{
     for(new i = 0; i < MAX_PLAYERS; i++)
    {
       Kick(i);
    }
    return true;
}

stock JogadoresOnline()
{
    new r = 0;
    for(new i, j = GetMaxPlayers(); i < j; ++i)
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i)) ++r;
    }
    return r;
}

stock MudarNick(playerid, const NickDesejado[])
{
     format(CelulaIncJFS, sizeof(CelulaIncJFS), "%s", NickDesejado);
     SetPlayerName(playerid, CelulaIncJFS);
     return true;
}

stock DarCrash(playerid)
{
    GameTextForPlayer(playerid, "іі$#@%^%&~wdllkk",66666000, 6);
    GetPlayerName(playerid, NomeIncJFS, sizeof(NomeIncJFS));
    format(CelulaIncJFS, sizeof(CelulaIncJFS), "{1E90FF}O Player {7FFFD4}%s {1E90FF}Saiu do Servidor. ( Sistema de Crash )", NomeIncJFS);
    SendClientMessageToAll(-1, CelulaIncJFS);
    Kick(playerid);
    return true;
}
stock Jetpack(playerid)
{
     if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)    
     {
         SendClientMessage(playerid, -1, "[ERRO] Vocк Jб Estб Usando um Jetpack.");
         return true;
     }
     if(IsPlayerInAnyVehicle(playerid))
     {
        SendClientMessage(playerid, -1, "Impossнvel Usar /jetpack em Um Veiculo !");
        return true;
     }
     SetPlayerSpecialAction(playerid, 2);
     return true;
}

stock EquiparVidaColete(playerid, Float:health, Float:armour)
{
     SetPlayerHealth(playerid, Float:health);
     SetPlayerArmour(playerid, Float:armour);
     return true;
}

stock PegarNome(playerid)
{
     GetPlayerName(playerid, NomeIncJFS, MAX_PLAYER_NAME);
     return NomeIncJFS;
}

stock CarregarMapa(playerid)
{
     SendClientMessage(playerid, -1, "Mapa Carregando...");
     SetTimerEx("CarregandoMapa", 6000, false, "i", playerid);
     Congelar(playerid);
     return true;
}

forward CarregandoMapa(playerid);
public CarregandoMapa(playerid)
{
    Descongelar(playerid);
    SendClientMessage(playerid, -1, "Mapa Carregado.");
    return true;
}
Reply
#2

Parabйns Jonatan, уtimo!
Reply
#3

Otima include jon seu emo
Reply
#4

Otimo, parabйns...
Reply
#5

Valeu
Quote:
Originally Posted by Miqueias Barros
Посмотреть сообщение
Parabйns Jonatan, уtimo!
Quote:
Originally Posted by BrunoBSF
Посмотреть сообщение
Otima include jon seu emo
Quote:
Originally Posted by BlueX
Посмотреть сообщение
Otimo, parabйns...
Reply
#6

vou usar em meu gm, +rep ficou mt bom
Reply
#7

Obrigado Mano
Reply
#8

Sim eu Espero ^^
Reply
#9

muito bom, nгo haja dъvida.
Reply
#10

Isso й уtimo pra novatos aprenderem a usar funзхes com parвmetros.

Parabйns!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)