Perssonalizando Networck.pas e Core.pas
Soldat 2D :: Soldat :: Customização :: Scripts
Página 1 de 1
Perssonalizando Networck.pas e Core.pas
Bom, Aqui Abaixo tem Uns Scripts q Eu Fiz para perssonalizar quem quisser pegar e so copiar e colar nas suas respectivas pastas
Networckcore.pas - Foi Adicionado !regras q voce Tera q Edita e tembem foi adiciona !hora - Taram em verde
e uma nova interface como !p !up !rr !map nome !liberar todos esses comandos foram Perssonalizados - isso voce vai ver depois q esperimentar se gosta me de um +...
Tudo foi Feito Por Danthix mais ta como mascarado ali enbaixo meu nick no jogo..... Gosto me de Um +....
Networckcore.pas Abaixo e so Subistituir pelo seu ou seja colar por cima...
Core.pas Abaixo e so Subistituir pelo seu ou seja colar por cima...
Gostou..... do Topico...... me de um +........
Qualquer erro Poste no Topico.....
Abraço...............
Networckcore.pas - Foi Adicionado !regras q voce Tera q Edita e tembem foi adiciona !hora - Taram em verde
e uma nova interface como !p !up !rr !map nome !liberar todos esses comandos foram Perssonalizados - isso voce vai ver depois q esperimentar se gosta me de um +...
Tudo foi Feito Por Danthix mais ta como mascarado ali enbaixo meu nick no jogo..... Gosto me de Um +....
Networckcore.pas Abaixo e so Subistituir pelo seu ou seja colar por cima...
- Código:
{
Mascarado SoldatServer Scripts
Versão: 1.1.0 - By Mascarado
www.soldat2d.forumeiros.com
}
var
iUnpauseTarget: integer;
inpause,startunpause: boolean;
function OnRequestGame(IP: string; State: integer): integer;
begin
Result := State;
{
IMPORTANT NOTE:
If you modify Result, please take into consideration that the user
may also be using another script which also modified the result...
To avoid conflictions, PLEASE perform logical checks...
}
end;
procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: byte);
begin
end;
procedure OnJoinGame(ID, Team: byte);
begin
Poked[ID] := False;
end;
procedure OnJoinTeam(ID, Team: byte);
begin
if not Poked[ID] then
begin
WriteConsole(ID,'Encontre Clans + Ranking + Chat + Forum + Tudo melhor!',$33CCFF);
WriteConsole(ID,'Acesse SX Brasil: www.xxxxxxx.com',RGB(255,130,23));
WriteConsole(ID,'Acesse SX Brasil: www.xxxxxxx.com',$33CCFF);
Poked[ID] := True;
end;
end;
procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
Poked[ID] := False;
end;
procedure OnFlagGrab(ID, TeamFlag: byte; GrabbedInBase: boolean);
begin
end;
procedure OnFlagReturn(ID, TeamFlag: byte);
begin
end;
procedure OnFlagScore(ID, TeamFlag: byte);
begin
end;
procedure OnMapChange(NewMap: string);
begin
Pausado := False;
Despausando := False;
DespauseConta := 0;
end;
procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
begin
end;
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
// Victim = Player Damaged // Shooter = Player doing the damage
result := Damage;
end;
procedure OnPlayerRespawn(ID: byte);
begin
end;
procedure OnPlayerSpeak(ID: byte; Text: string);
var
Map: string;
begin
Text := Lowercase(Text);
[color=green]if Text = '!comandos' then
begin
WriteConsole(0, 'Comandos do Jogador:',$FF88FF88);
if ModoCFX1 then
begin
WriteConsole(0, '!pause (!p) ou !unpause (!up): Parar ou continuar jogo',$FF88FF88);
WriteConsole(0, '!restart (!rr): Reiniciar mapa',$FF88FF88);
WriteConsole(0, '!map nome: Mudar mapa CF',$FF88FF88);
WriteConsole(0, '!unbanlast (!ub): Desbanir o ultimo banido',$FF88FF88);
WriteConsole(0, '!liberar: Liberar servidor apos fim do CF',$FF88FF88);
WriteConsole(0, '/\ Comandos de CF Acima /',$0057D603);
WriteConsole(0, '\/ Comandos Normais Abaixo \/',$0057D603);
end;
WriteConsole(0, '!red ou !alpha Muda Para Equipe Alpha',$FF88FF88);
WriteConsole(0, '!blue ou !bravo Muda Para Equipe Bravo',$FF88FF88);
WriteConsole(0, '!spec Torna-se Espectador',$FF88FF88);
WriteConsole(0, '!regras Ver as Regras do Servidor',$FF88FF88);
WriteConsole(0, '!hora Para Ver o Horario Atual',$FF88FF88);
WriteConsole(0, '!admin Chama o Admin ele Atenderar Assim que Possivel',$FF88FF88);
end;
if (Text='!regras') then begin
WriteConsole(ID, 'Linha 1',$0057D603);
WriteConsole(ID, 'Linha 2',$0057D603);
WriteConsole(ID, 'Linha 3',$0057D603);
WriteConsole(ID, 'Linha 4',$0057D603);
WriteConsole(ID, 'Linha 5',$0057D603);
end;
if (Text='!hora') then begin
WriteConsole(0, 'Horario atual: '+FormatDate('hh:nn:ss'), $66FF00);
end;[/color]
if ModoCFX1 then
begin
if ((Text = '!pause') or (Text = 't!pause') or (Text = '!p') or (Text = 't!p')) and (not Pausado) then
begin
Pausado := True;
Despausando := False;
DespauseConta := 0;
WriteConsole(0, 'Jogo pausado.',MSGCor);
Command('/pause');
end
else
if ((Text = '!unpause') or (Text = '!up')) and (Pausado) then
begin
WriteConsole(0, 'Despausando em...',MSGCor);
Despausando := True;
end
else
if (Text = '!restart') or (Text = '!rr') or (Text = '!res') or (Text = '!r') then
begin
WriteConsole(0, 'Reiniciando mapa...',MSGCor);
Command('/restart');
end
else
if (Text = '!unbanlast') or (Text = '!unban') or (Text = '!ub') then
begin
Command('/unbanlast');
WriteConsole(0, 'Ultimo Jogador Banido foi desbanido.',MSGCor);
end
else
if (MaskCheck(Text,'!map*')) then
begin
Map := GetPiece(Text,' ',1);
if (FileExists('maps/' +Map+ '.PMS')) then
Command('/map ' + Map)
else
WriteConsole(0, 'Mapa '+Map+' nao encontrado!',MSGCor);
end
else
if Text = '!liberar' then
begin
WriteConsole(0, 'Liberando servidor, entre novamente...',MSGCor);
ModoCFX1 := False;
Command('/password');
Command('/loadcon soldat.ini');
end;
end;
if (Text = '!spec') or (Text = '!spectator') then
Command('/setteam5 ' + IntToStr(ID))
else
if (Text = '!alpha') or (Text = '!joina') or (Text = '!red') then
Command('/setteam1 ' + IntToStr(ID))
else
if (Text = '!bravo') or (Text = '!joinb') or (Text = '!blue') then
Command('/setteam2 ' + IntToStr(ID));
{ if (Text = '!charlie') or (Text = '!joinc') or (Text = '!yellow') then
Command('/setteam3 ' + IntToStr(ID));
if (Text = '!delta') or (Text = '!joind') or (Text = '!green') then
Command('/setteam4 ' + IntToStr(ID));
}
end;
Core.pas Abaixo e so Subistituir pelo seu ou seja colar por cima...
- Código:
{$VERSION 2.6.0}
{
Mascarado SoldatServer Scripts
Versão: 1.1.0 - By Mascarado
www.soldat2d.forumeiros.com
}
const
//Teams
ALPHA = 1;
BRAVO = 2;
CHARLIE = 3;
DELTA = 4;
SPECTATOR = 5;
//Game Modes
DEATHMATCH = 0;
POINTMATCH = 1;
TEAMMATCH = 2;
CTF = 3;
RAMBO = 4;
INF = 5;
HTF = 6;
//Weapons
DEAGLES = 1;
HKMP5 = 2;
AK74 = 3;
STEYR = 4;
SPAS = 5;
RUGER = 6;
M79 = 7;
BARRET = 8;
MINIMI = 9;
MINIGUN = 10;
FLAMER = 11;
BOW = 12;
FLAMEBOW = 13;
SOCOM = 0;
KNIFE = 14;
CHAINSAW = 15;
LAW = 16;
MSGCor = $66FF00;
var
ModoCFX1, Pausado, Despausando: Boolean;
DespauseConta: Integer;
Poked: array[1..32] of Boolean;
procedure ActivateServer();
begin
ModoCFX1 := False;
Pausado := False;
Despausando := False;
DespauseConta := 0;
end;
procedure AppOnIdle(Ticks: integer);
begin
if Ticks mod (3600 * 3) = 0 then
begin
WriteConsole(0,'Usse !comandos \o/',$33CCFF);
end;
if Despausando then
if Ticks mod 60 = 0 then
case DespauseConta of
0,1,2: begin
WriteConsole(0, IntToStr(3-DespauseConta),MSGCor);
DespauseConta := DespauseConta +1;
end;
3 : begin
Pausado := False;
Despausando := False;
DespauseConta := 0;
WriteConsole(0, 'Vai!',MSGCor);
WriteConsole(0, 'Vai!',MSGCor);
Command('/unpause');
end;
end;
end;
function OnCommand(ID: Byte; Text: string): boolean;
var
TextLow: String;
begin
//NOTE: This function will be called when an admin types a / command.
Result := false; // Return true if you want to ignore the command typed.
TextLow := Lowercase(Text);
if Copy(TextLow, 1, 5) = '/msgy' then
begin
Text := Copy(Text, 7, Length(Text));
DrawText(0,Text,330,RGB(255,255,0),0.20,40,120);
end;
if Copy(TextLow, 1, 5) = '/msgr' then
begin
Text := Copy(Text, 7, Length(Text));
DrawText(0,Text,330,RGB(255,0,0),0.20,40,120);
end;
if Copy(TextLow, 1, 5) = '/msgg' then
begin
Text := Copy(Text, 7, Length(Text));
DrawText(0,Text,330,RGB(0,255,0),0.20,40,120);
end;
if Copy(TextLow, 1, 5) = '/oncf' then
begin
ModoCFX1 := True;
WriteConsole(0, 'Ativado: !pause (!p) !unpause (!up) !restart (!rr) !unbanlast (!ub) !map !liberar',MSGCor);
end;
if Copy(TextLow, 1, 6) = '/offcf' then
begin
ModoCFX1 := False;
WriteConsole(0, 'Desativado: !pause (!p) !unpause (!up) !restart (!rr) !unbanlast (!ub) !map !liberar',MSGCor);
end;
if Copy(TextLow, 1, 8) = '/liberar' then
begin
WriteConsole(0, 'Servidor Liberado Entre Novamente...',MSGCor);
ModoCFX1 := False;
Command('/password');
Command('/loadcon soldat.ini');
end;
if (Copy(TextLow, 1, 6) = '/pause') and (not Pausado) then
begin
Pausado := True;
Despausando := False;
DespauseConta := 0;
WriteConsole(0, 'Jogo pausado.',MSGCor);
Command('/pause');
end;
if Copy(TextLow, 1, 8) = '/unpause' then
begin
WriteConsole(0, 'Despausando em...',MSGCor);
Pausado := False;
Despausando := True;
Result := True;
end;
if GetPiece(TextLow,' ',0) = '/say' then
begin
WriteConsole(0,'[Admin] ' + Copy(Text,6,Length(Text)),$FF88FF88);
Result := True;
end;
if GetPiece(TextLow,' ',0) = '/pm' then
try
WriteConsole(StrToInt(GetPiece(Text,' ',1)),'[PM] [Admin] ' + Copy(Text,Length(GetPiece(Text,' ',1)) + 6,Length(Text)),$FF2626);
Result := True;
except
end;
end;
function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
//NOTE: This function will be called when [_ANY_] player types a / command.
Result := false; //Return true if you want disable the command typed.
end;
procedure OnException(ErrorMessage: string);
begin
// WriteFile('ErrorLog.txt', ErrorMessage);
end;
Gostou..... do Topico...... me de um +........
Qualquer erro Poste no Topico.....
Abraço...............
Última edição por danthix em Sáb Jul 31, 2010 12:57 pm, editado 1 vez(es)
danthix- Noob
- Data de inscrição : 11/04/2010
Localização : jundiai, SP
Nick : Mascarado
Clan : e[BR] ~>
Reputação : 0
Re: Perssonalizando Networck.pas e Core.pas
Erros Foram Corrigidos ja dei Uma Revissada
danthix- Noob
- Data de inscrição : 11/04/2010
Localização : jundiai, SP
Nick : Mascarado
Clan : e[BR] ~>
Reputação : 0
Soldat 2D :: Soldat :: Customização :: Scripts
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|