[GameMode] GameMode de dm (BASE)
#1

Bom galera, ja postei este gm uma vez e vou postar de novo por que eu tinha postado na area errada :S mas agora ta na area certa, vamo ao gm...


Bom, ele e uma base para quem quer comeзar seu server servidor de DM (ele e iniciante mas e meu primeiro gm da uma folga ne ).

Comandos:
→/ajuda(la resume todos os comandos)
→/creditos(dг e logico que e pra ver os creditos D= )
→/teles(para ver os teleportes)
→/x1(so fiz esta arena pois e um gm de base)
→/status(para ver seus status no servidor)

Cod:
PHP код:
//================================= INCLUDES =====================================
#include <a_samp>
#include <dini>
//================================== DEFINES =====================================
#define REGISTRO 1
#define LOGIN    2
#define CONTAS "Jogadores/%s.ini"
//================================= NEWS =========================================
new Matou[MAX_PLAYERS];
new 
Morreu[MAX_PLAYERS];
new 
Logou[MAX_PLAYERS];
new 
Text:Textdraw0;
new 
Text:Textdraw1;
new 
Text:Textdraw2;
new 
Text:Textdraw3;
new 
reply[MAX_PLAYERS];
static 
Text:rMensagems;
static 
CoresRandomv[] = {
0xFF140088,
0x00FF1E88,
0xC8C8C888,
0xFF003788,
0x004BFF88,
0xF000FF88,
0x00FFC888,
0x87FF0088,
0x5000FF88,
0xB0C4DE88
};
static 
MensagensRandomv[5][4000] = {
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR"
};
public 
OnFilterScriptInit()
{
    print(
"\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
    print(
" ==============BRASIL DM================");
    print(
"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
    return 
1;
}
main()
{
    print(
"\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
    print(
" ===============BRASIL DM================");
    print(
"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
}
public 
OnGameModeInit()
{
    
SetGameModeText("BRASIL DM");
    
AddPlayerClass(80,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(293,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(107,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(45,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(47,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(49,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(70,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(71,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(83,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(84,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(118,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(108,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    
AddPlayerClass(115,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(203,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(205,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(215,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(221,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(223,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(226,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(244,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    
AddPlayerClass(246,-2746.3472,428.3672,4.3281,181.4583,24,9999999,28,9999999,30,99999990);
    
AddPlayerClass(46,-2746.3472,428.3672,4.3281,181.4583,24,9999999,28,9999999,30,99999990);
    
AddPlayerClass(57,-2746.3472,428.3672,4.3281,181.4583,24,9999999,28,9999999,30,99999990);
    
AddPlayerClass(138,-2746.3472,428.3672,4.3281,181.4583,12,9999999,23,9999999,28,9999999);
    
AddPlayerClass(248,-2746.3472,428.3672,4.3281,181.4583,12,9999999,23,9999999,28,9999999);
    
AddPlayerClass(249,-2746.3472,428.3672,4.3281,181.4583,12,9999999,23,9999999,28,9999999);
    return 
1;
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerCameraPos(playerid1024.4758,-2160.1909,39.8466);
    
SetPlayerCameraLookAt(playerid1018.5209,-2160.5066,38.5108);
    
SetPlayerPos(playerid1009.5659,-2161.0220,36.4699);
    
SetPlayerFacingAngle(playerid273.9439);
    
SetPlayerInterior(playerid0);
    return 
ApplyAnimation(playerid"PARK""Tai_Chi_Loop"4.010000);
}
public 
OnPlayerConnect(playerid)
{
    new 
Nome[MAX_PLAYER_NAME];
    new 
pName[MAX_PLAYER_NAME];
    
TextDrawShowForPlayer(playeridTextdraw0);
    
TextDrawShowForPlayer(playeridTextdraw1);
    
TextDrawShowForPlayer(playeridTextdraw2);
    
TextDrawShowForPlayer(playeridTextdraw3);
    
PlayerPlaySound(playerid,10970.00.00.0); //SOM LIGANDO
    
GameTextForPlayer(playerid,"~n~~n~~n~~n~~b~Seja Bem Vindo",5000,5);
    new 
string[48];
    
GetPlayerName(playeridpNamesizeof(pName));
    
format(stringsizeof(string), "%s Entrou no Servidor!"pName);
    
SendClientMessageToAll(0xAAAAAAAAstring);
    return 
reply[playerid] = 0;
    
GetPlayerName(playeridNomesizeof(Nome));
    new 
String[100];
    
format(Stringsizeof(String), CONTASNome);
    if(!
dini_Exists(String))
    {
        
format(Stringsizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar"Nome);
        
ShowPlayerDialog(playeridREGISTRODIALOG_STYLE_INPUT"Registro"String"Registrar""Cancelar");
    }
    else
    {
        
format(Stringsizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar"Nome);
        
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Registro"String"Logar""Cancelar");
    }
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
pName[MAX_PLAYER_NAME];
    new 
string[48];
    
GetPlayerName(playeridpNamesizeof(pName));
    
format(stringsizeof(string), "%s Saiu do Servidor )=! "pName);
    
SalvarPlayer(playerid);
    return 
SendClientMessageToAll(0xAAAAAAAAstring);
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    if(
IsPlayerConnected(killerid))
    {
        
Matou[killerid]++;
    }
    
Morreu[playerid]++;
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/status"cmdtexttrue10) == 0)
    {
        
Status(playerid);
        return 
1;
    }
    if (
strcmp("/ajuda"cmdtexttrue10) == 0)
    {
        
SendClientMessage(playerid0xFF0000AA"Use: /teles (para saber os teleportes)");
        
SendClientMessage(playerid0xFF0000AA"Use: /creditos (para saber os criadores do gamemode)");
        
SendClientMessage(playerid0xFF0000AA"Use: /status (para saber seu status no servidor)");
        return 
1;
    }
    if (
strcmp("/creditos"cmdtexttrue10) == 0)
    {
        
SendClientMessage(playerid0xFF0000AA"Toni_Santolia pela criaзгo da base do gamemode");
        return 
1;
    }
    if (
strcmp("/teles"cmdtexttrue10) == 0)
    {
        
SendClientMessage(playerid0xFF0000AA"Use: /x1(so fiz este teleporte para voces)");
        return 
1;
    }
    if(
strcmp(cmdtext"/x1"true) == 0)
    {
    new 
pname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnameMAX_PLAYER_NAME);
    
format(stringsizeof(string), "%s foi para a arena de {FF00FF}X1 {FF0000}( /x1 )"pname);
    
SendClientMessageToAll(COLOR_YELLOWstring);
    
ResetPlayerWeapons(playerid);
    
SetPlayerInterior(playerid,0);
    
SetPlayerPos(playerid, -1416.38271246.92461039.8741);
    
SetPlayerFacingAngle(playerid273.7604);
    
SetPlayerArmour(playerid100.0);
    
SetPlayerHealth(playerid100.0);
    
ResetPlayerWeapons(playerid);
    
GivePlayerWeapon(playerid,4,0);
    
GivePlayerWeapon(playerid,26,9999);
    
GivePlayerWeapon(playerid,31,9999);
    
GivePlayerWeapon(playerid,24,9999);
    
GivePlayerWeapon(playerid,32,9999);
    return 
1;
    }
    return 
0;
}
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    return 
1;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnRconCommand(cmd[])
{
    return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    return 
1;
}
public 
OnObjectMoved(objectid)
{
    return 
1;
}
public 
OnPlayerObjectMoved(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnVehicleMod(playeridvehicleidcomponentid)
{
    return 
1;
}
public 
OnVehiclePaintjob(playeridvehicleidpaintjobid)
{
    return 
1;
}
public 
OnVehicleRespray(playeridvehicleidcolor1color2)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerExitedMenu(playerid)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    return 
1;
}
public 
OnRconLoginAttempt(ip[], password[], success)
{
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    return 
1;
}
public 
OnPlayerStreamIn(playeridforplayerid)
{
    return 
1;
}
public 
OnPlayerStreamOut(playeridforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamIn(vehicleidforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamOut(vehicleidforplayerid)
{
    return 
1;
}
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == REGISTRO)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
Nome[MAX_PLAYER_NAME];
                
GetPlayerName(playeridNomesizeof(Nome));
                new 
String[100];
                
format(Stringsizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar"Nome);
                
ShowPlayerDialog(playeridREGISTRODIALOG_STYLE_INPUT"Registro"String"Registrar""Cancelar");
                
SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha vбlida");
                return 
1;
            }
            new 
Nome[MAX_PLAYER_NAME];
            
GetPlayerName(playeridNomesizeof(Nome));
            new 
String[100];
            
format(Stringsizeof(String), CONTASNome);
            
dini_Create(String);
            
dini_Set(String,"Senha",inputtext);
            
dini_IntSet(String,"Dinheiro",0);
            
dini_IntSet(String,"Vida"100);
            
dini_IntSet(String,"Colete"100);
            
dini_IntSet(String,"Matou",0);
            
dini_IntSet(String,"Morreu",0);
            
dini_IntSet(String,"Logou",0);
            
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Login""{1E90FF}Pronto vocк se registrou agora digite Sua Senha Para Logar-Se""Logar""Cancelar");
            return 
1;
        }
        else
        {
            
SendClientMessage(playerid0xFF0000AA"Vocк Foi Kickado Porque Nгo Quis Se Registrar!!");
            
Kick(playerid);
            return 
1;
        }
    }
    if(
dialogid == LOGIN)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
Nome[MAX_PLAYER_NAME];
                
GetPlayerName(playeridNomesizeof(Nome));
                new 
String[100];
                
format(Stringsizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar"Nome);
                   
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Registro"String"Logar""Cancelar");
                
SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
                return 
1;
            }
            new 
Nome[MAX_PLAYER_NAME];
            
GetPlayerName(playeridNomesizeof(Nome));
            new 
String[100];
            
format(Stringsizeof(String), CONTASNome);
            if(!
strcmp(inputtext,dini_Get(String,"Senha"),false))
            {
                
SetarPlayer(playerid);
                
Logou[playerid]++;
                
SendClientMessage(playerid,0x00FF00AA,"Vocк Foi Logado Com Sucesso > Escolha Sua Skin!");
                return 
1;
            }
            else
            {
                
SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
                
format(Stringsizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar"Nome);
                
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Registro"String"Logar""Cancelar");
            }
            return 
1;
        }
        else
        {
            
SendClientMessage(playerid0xFF0000AA"Vocк nгo quis se logar, por este motivo serб Kickado");
            
Kick(playerid);
            return 
1;
        }
    }
    return 
1;
}
SalvarPlayer(playerid)
{
    new 
Float:Vida;
    new 
Float:Colete;
    
GetPlayerHealth(playeridVida);
    
GetPlayerArmour(playeridColete);
    new 
Nome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNomesizeof(Nome));
    new 
String[50];
    
format(Stringsizeof(String), CONTASNome);
    
dini_IntSet(String,"Dinheiro"GetPlayerMoney(playerid));
    
dini_FloatSet(String,"Vida"Vida);
    
dini_FloatSet(String,"Colete"Colete);
    
dini_IntSet(String,"Matou"Matou[playerid]);
    
dini_IntSet(String,"Morreu"Morreu[playerid]);
    
dini_IntSet(String,"Logou"Logou[playerid]);
    return 
1;
}
SetarPlayer(playerid)
{
    
SendClientMessage(playerid0xFF0000AA"================================================");
    new 
Nome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNomesizeof(Nome));
    new 
String[50];
    
format(Stringsizeof(String), CONTASNome);
    
GivePlayerMoney(playeriddini_Int(String,"Dinheiro"));
    
SetPlayerHealth(playeriddini_Int(String,"Vida"));
    
SetPlayerArmour(playeriddini_Int(String,"Colete"));
    
Matou[playerid] = dini_Int(String"Matou");
    
Morreu[playerid] = dini_Int(String"Morreu");
    
Logou[playerid] = dini_Int(String"Logou");
    
SendClientMessage(playerid0xFF0000AA"================================================");
    return 
1;
}
Status(playerid)
{
    new 
Nome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNomesizeof(Nome));
    new 
String[128];
    
SendClientMessage(playerid0xFF0000AA"================================================");
    
format(Stringsizeof(String),"~r~Status De %s",Nome);
    
SendClientMessage(playerid0xFFFF00AA,String);
    
format(Stringsizeof(String),"~r~Dinheiro: %d  Matou: %d  Morreu: %d"GetPlayerMoney(playerid),Matou[playerid],Morreu[playerid]);
    
SendClientMessage(playerid0x1E90FFAA,String);
    
format(Stringsizeof(String),"~r~Vocк Jб Logou %d Vezes Neste Servidor",Logou[playerid]);
    
SendClientMessage(playerid0x1E90FFAA,String);
    
SendClientMessage(playerid0xFF0000AA"================================================");
    return 
1;
}
//============================== TEXT'S DRAWS ====================================
forward Atualizartdraw();
public 
Atualizartdraw()
{
        
TextDrawColor(rMensagemsCoresRandomv[random(sizeof(CoresRandomv))]);
        
TextDrawSetString(rMensagemsMensagensRandomv[random(sizeof(MensagensRandomv))]);
        
TextDrawShowForAll(rMensagems);
        return 
true;

Bom e isso, deixem suas criticas e comentarios construtivos, eu pego gamemodes de base(sei codar bem) mas e o primeiro gm que eu construo do 0 '-'.
Reply
#2

pawn Код:
public OnFilterScriptInit()
{
    print("\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
    print(" ==============BRASIL DM================");
    print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
    return 1;
}
? Se й um Game Mode Pra que isso ?
Reply
#3

E Assim KKKkk

pawn Код:
//================================= INCLUDES =====================================
#include <a_samp>
#include <dini>
//================================== DEFINES =====================================
#define REGISTRO 1
#define LOGIN    2
#define CONTAS "Jogadores/%s.ini"
//================================= NEWS =========================================
new Matou[MAX_PLAYERS];
new Morreu[MAX_PLAYERS];
new Logou[MAX_PLAYERS];
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new reply[MAX_PLAYERS];

static Text:rMensagems;
static CoresRandomv[] = {
0xFF140088,
0x00FF1E88,
0xC8C8C888,
0xFF003788,
0x004BFF88,
0xF000FF88,
0x00FFC888,
0x87FF0088,
0x5000FF88,
0xB0C4DE88
};


static MensagensRandomv[5][4000] = {
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR",
"[SERVER] MENSAGEM RANDOMICA QUE PASSA NO SEU SERVIDOR"
};

main()
{
    print("\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
    print(" ===============BRASIL DM================");
    print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
}

public OnGameModeInit()
{
    SetGameModeText("BRASIL DM");
    AddPlayerClass(80,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(293,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(107,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(45,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(47,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(49,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(70,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(71,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(83,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(84,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(118,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(108,-2746.3472,428.3672,4.3281,181.4583,22,9999999,30,9999999,32,9999999);
    AddPlayerClass(115,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(203,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(205,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(215,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(221,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(223,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(226,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(244,-2746.3472,428.3672,4.3281,181.4583,24,9999999,31,9999999,29,9999999);
    AddPlayerClass(246,-2746.3472,428.3672,4.3281,181.4583,24,9999999,28,9999999,30,99999990);
    AddPlayerClass(46,-2746.3472,428.3672,4.3281,181.4583,24,9999999,28,9999999,30,99999990);
    AddPlayerClass(57,-2746.3472,428.3672,4.3281,181.4583,24,9999999,28,9999999,30,99999990);
    AddPlayerClass(138,-2746.3472,428.3672,4.3281,181.4583,12,9999999,23,9999999,28,9999999);
    AddPlayerClass(248,-2746.3472,428.3672,4.3281,181.4583,12,9999999,23,9999999,28,9999999);
    AddPlayerClass(249,-2746.3472,428.3672,4.3281,181.4583,12,9999999,23,9999999,28,9999999);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerCameraPos(playerid, 1024.4758,-2160.1909,39.8466);
    SetPlayerCameraLookAt(playerid, 1018.5209,-2160.5066,38.5108);
    SetPlayerPos(playerid, 1009.5659,-2161.0220,36.4699);
    SetPlayerFacingAngle(playerid, 273.9439);
    SetPlayerInterior(playerid, 0);
    return ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
}

public OnPlayerConnect(playerid)
{
    new Nome[MAX_PLAYER_NAME];
    new pName[MAX_PLAYER_NAME];
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    PlayerPlaySound(playerid,1097, 0.0, 0.0, 0.0); //SOM LIGANDO
    GameTextForPlayer(playerid,"~n~~n~~n~~n~~b~Seja Bem Vindo",5000,5);
    new string[48];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s Entrou no Servidor!", pName);
    SendClientMessageToAll(0xAAAAAAAA, string);
    return reply[playerid] = 0;
    GetPlayerName(playerid, Nome, sizeof(Nome));
    new String[100];
    format(String, sizeof(String), CONTAS, Nome);
    if(!dini_Exists(String))
    {
        format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
        ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
    }
    else
    {
        format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
        ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
    }
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    new pName[MAX_PLAYER_NAME];
    new string[48];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s Saiu do Servidor )=! ", pName);
    SalvarPlayer(playerid);
    return SendClientMessageToAll(0xAAAAAAAA, string);
}
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerConnected(killerid))
    {
        Matou[killerid]++;
    }
    Morreu[playerid]++;
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/status", cmdtext, true, 10) == 0)
    {
        Status(playerid);
        return 1;
    }
    if (strcmp("/ajuda", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Use: /teles (para saber os teleportes)");
        SendClientMessage(playerid, 0xFF0000AA, "Use: /creditos (para saber os criadores do gamemode)");
        SendClientMessage(playerid, 0xFF0000AA, "Use: /status (para saber seu status no servidor)");
        return 1;
    }
    if (strcmp("/creditos", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Toni_Santolia pela criaзгo da base do gamemode");
        return 1;
    }
    if (strcmp("/teles", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Use: /x1(so fiz este teleporte para voces)");
        return 1;
    }
    if(strcmp(cmdtext, "/x1", true) == 0)
    {
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s foi para a arena de {FF00FF}X1 {FF0000}( /x1 )", pname);
    SendClientMessageToAll(COLOR_YELLOW, string);
    ResetPlayerWeapons(playerid);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid, -1416.3827, 1246.9246, 1039.8741);
    SetPlayerFacingAngle(playerid, 273.7604);
    SetPlayerArmour(playerid, 100.0);
    SetPlayerHealth(playerid, 100.0);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,4,0);
    GivePlayerWeapon(playerid,26,9999);
    GivePlayerWeapon(playerid,31,9999);
    GivePlayerWeapon(playerid,24,9999);
    GivePlayerWeapon(playerid,32,9999);
    return 1;
    }
    return 0;
}
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == REGISTRO)
    {
        if(response)
        {
            if(!strlen(inputtext))
            {
                new Nome[MAX_PLAYER_NAME];
                GetPlayerName(playerid, Nome, sizeof(Nome));
                new String[100];
                format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
                ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
                SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha vбlida");
                return 1;
            }
            new Nome[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Nome, sizeof(Nome));
            new String[100];
            format(String, sizeof(String), CONTAS, Nome);
            dini_Create(String);
            dini_Set(String,"Senha",inputtext);
            dini_IntSet(String,"Dinheiro",0);
            dini_IntSet(String,"Vida", 100);
            dini_IntSet(String,"Colete", 100);
            dini_IntSet(String,"Matou",0);
            dini_IntSet(String,"Morreu",0);
            dini_IntSet(String,"Logou",0);
            ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", "{1E90FF}Pronto vocк se registrou agora digite Sua Senha Para Logar-Se", "Logar", "Cancelar");
            return 1;
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Vocк Foi Kickado Porque Nгo Quis Se Registrar!!");
            Kick(playerid);
            return 1;
        }
    }
    if(dialogid == LOGIN)
    {
        if(response)
        {
            if(!strlen(inputtext))
            {
                new Nome[MAX_PLAYER_NAME];
                GetPlayerName(playerid, Nome, sizeof(Nome));
                new String[100];
                format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
                   ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
                SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
                return 1;
            }
            new Nome[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Nome, sizeof(Nome));
            new String[100];
            format(String, sizeof(String), CONTAS, Nome);
            if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
            {
                SetarPlayer(playerid);
                Logou[playerid]++;
                SendClientMessage(playerid,0x00FF00AA,"Vocк Foi Logado Com Sucesso > Escolha Sua Skin!");
                return 1;
            }
            else
            {
                SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
                format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s  {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
                ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
            }
            return 1;
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo quis se logar, por este motivo serб Kickado");
            Kick(playerid);
            return 1;
        }
    }
    return 1;
}

SalvarPlayer(playerid)
{
    new Float:Vida;
    new Float:Colete;
    GetPlayerHealth(playerid, Vida);
    GetPlayerArmour(playerid, Colete);
    new Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    new String[50];
    format(String, sizeof(String), CONTAS, Nome);
    dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
    dini_FloatSet(String,"Vida", Vida);
    dini_FloatSet(String,"Colete", Colete);
    dini_IntSet(String,"Matou", Matou[playerid]);
    dini_IntSet(String,"Morreu", Morreu[playerid]);
    dini_IntSet(String,"Logou", Logou[playerid]);
    return 1;
}

SetarPlayer(playerid)
{
    SendClientMessage(playerid, 0xFF0000AA, "================================================");
    new Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    new String[50];
    format(String, sizeof(String), CONTAS, Nome);
    GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
    SetPlayerHealth(playerid, dini_Int(String,"Vida"));
    SetPlayerArmour(playerid, dini_Int(String,"Colete"));
    Matou[playerid] = dini_Int(String, "Matou");
    Morreu[playerid] = dini_Int(String, "Morreu");
    Logou[playerid] = dini_Int(String, "Logou");
    SendClientMessage(playerid, 0xFF0000AA, "================================================");
    return 1;
}

Status(playerid)
{
    new Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, sizeof(Nome));
    new String[128];
    SendClientMessage(playerid, 0xFF0000AA, "================================================");
    format(String, sizeof(String),"~r~Status De %s",Nome);
    SendClientMessage(playerid, 0xFFFF00AA,String);
    format(String, sizeof(String),"~r~Dinheiro: %d  Matou: %d  Morreu: %d", GetPlayerMoney(playerid),Matou[playerid],Morreu[playerid]);
    SendClientMessage(playerid, 0x1E90FFAA,String);
    format(String, sizeof(String),"~r~Vocк Jб Logou %d Vezes Neste Servidor",Logou[playerid]);
    SendClientMessage(playerid, 0x1E90FFAA,String);
    SendClientMessage(playerid, 0xFF0000AA, "================================================");
    return 1;
}

//============================== TEXT'S DRAWS ====================================

forward Atualizartdraw();
public Atualizartdraw()
{
        TextDrawColor(rMensagems, CoresRandomv[random(sizeof(CoresRandomv))]);
        TextDrawSetString(rMensagems, MensagensRandomv[random(sizeof(MensagensRandomv))]);
        TextDrawShowForAll(rMensagems);
        return true;
}
Reply
#4

Quote:
Originally Posted by ExpressxD
Посмотреть сообщение
pawn Код:
public OnFilterScriptInit()
{
    print("\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
    print(" ==============BRASIL DM================");
    print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
    return 1;
}
? Se й um Game Mode Pra que isso ?
se vc deletar vai cair o dedo?
Reply
#5

Fico bom parabens
Reply
#6

Vlw por compartilhar com nois parabens
Reply
#7

Expreesxd pra q criticar vey fika de boa manwo alem o cara tar compartilhando vc vem e critica
emquanto ao GM bom trabalho
Reply
#8

Quote:
Originally Posted by FriendrS
Посмотреть сообщение
Expreesxd pra q criticar vey fika de boa manwo alem o cara tar compartilhando vc vem e critica
emquanto ao GM bom trabalho
Criticando ?
Sу falei Pra que isso se й um game Mode ?
isso й critica? Pra mim й uma pergunta

@gForce.

Cade Seus Trabalhos ?
Algum ?
Reply
#9

Galera e meu primeiro gm, se pelomenos deixarem comentarios construtivos eu agradeceria, se for pra deixar xingando quer q se ****
Reply
#10

Express, verdade, por que vocк num faz um melhor? Pelo visto o cara й iniciante e por um erro besta vocк critica-o como se ele coda-se a mais de 50 anos? --' Acorda velhin.

Toni, bom gm, poderia ter estudado a бrvore de identaзгo.

Continue codando e nгo desista.*

#EDIT
Toni, vocк deveria colocar os crйditos do criador do sistema de login nй? Olhei o sistema e reconheci o cуdigo, creio que й o do TiagoPS. Caso for favor colocar os devidos crйditos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)