anyone who can help me +1 rep
help me please guys
error:
my folder plugins
my server.cfg
my gamemode
help me please guys
error:
my folder plugins
my server.cfg
PHP Code:
echo Executing Server Config...
lanmode 0
rcon_password minhapikasv
maxplayers 5
port 7777
hostname [ProjectZ] Testing script
gamemode0 projectz
filterscripts
plugins sscanf.dll streamer.dll
announce 1
query 1
weburl www.meusite.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 100
logtimeformat [%H:%M:%S]
PHP Code:
//==================================================================
#include <a_samp>
#include <ZCMD>
#include <sscanf>
#include <DOF2>
//====================DEFINES=======================================
#define D_Registrar 100
#define D_Logar 101
#define D_Sexo 102
#pragma tabsize 0
//==================================================================
#pragma unused ret_memcpy
//Cores
#define COLOR_LBLUE 0x1E90FFFF
#define COLOR_ERROR 0xFF0000FF
#define ID 1
//Kick & ban
#define KickP(%0) SetTimerEx("KickPlayer", 500, false, "i", %0)
//Player configs
#define CONTASS "Contas/%s.ini"
//==================================================================
new Float:coordSpawn[3];
new morreu[MAX_PLAYERS];
enum PlayerInfo
{
Skin,
Spawn,
Errosenha,
StatsSpawn,
};
new pInfo[MAX_PLAYERS][PlayerInfo];
//==================Spawns variados================
new Float:Spawnrandonplayers[11][3] = {
{690.2013,-467.9773,16.5363},
{-1546.1204,-2731.1055,48.5391},
{-1271.9763,2712.9788,50.2663},
{1354.9606,475.5364,20.1606},
{-41.8467,1179.1769,19.3797},
{-227.3263,985.0326,19.5998},
{1580.0342,-1635.5411,13.5604},
{1608.0400,-1670.4852,6.2188},
{-1617.0948,685.4459,7.1875},
{-1598.6437,734.0104,-4.9063},
{2264.9048,2445.0249,10.8203}
};
//==================Spawns variados================
//==================================================================
main()
{
}
public OnGameModeInit()
{
SetTimer("hoursplaying", 30*60*1000, true);
return 1;
}
public OnGameModeExit()
{
DOF2_Exit();
return 1;
}
public OnPlayerConnect(playerid)
{
pInfo[playerid][Errosenha] = 0;
SetPlayerColor(playerid, 0xFFFFFFFF);
//========================================
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SalvarPlayer(playerid);
pInfo[playerid][Spawn] = 0;
pInfo[playerid][StatsSpawn] = 0;
pInfo[playerid][Errosenha] = 0;
//========================================
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
//Login e registro
new pArquivos[50], String[256];
format(pArquivos, sizeof(pArquivos), CONTASS, PegarNome(playerid));
if(!DOF2_FileExists(pArquivos))
{
format(String, sizeof(String), "{FFFFFF}Bem vindo ao Essence DayZ \n\n{FFFFFF}Nome: {FF0000}%s \n\n{FFFFFF}Status: {FF0000}Registrado(a)", PegarNome(playerid));
ShowPlayerDialog(playerid, D_Registrar, DIALOG_STYLE_INPUT, "Registro (x)", String, "Registrar", "");
}
else
{
format(String, sizeof(String), "{FFFFFF}Bem vindo ao Essence DayZ \n\n{FFFFFF}Nome: {00FF04}%s \n\n{FFFFFF}Status: {00FF04}Registrado(a)", PegarNome(playerid));
ShowPlayerDialog(playerid, D_Logar, DIALOG_STYLE_PASSWORD, "Logando (x)", String, "Entrar", "Sair");
pInfo[playerid][Spawn] = 0;
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(pInfo[playerid][StatsSpawn] == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "Spere carregar ai Viado!");
return 0;
}
else
{
SpawnPlayer(playerid);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, pInfo[playerid][Skin]);
if(morreu[playerid]) {
new rand = random(sizeof(Spawnrandonplayers));
SetPlayerPos(playerid, Spawnrandonplayers[rand][0], Spawnrandonplayers[rand][1], Spawnrandonplayers[rand][2]);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
morreu[playerid] = false;
}
//========================================
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
//pInfo[playerid][Spawn] = 1;
morreu[playerid] = true;
SetTimerEx("Dialog_Sexo", 7000, 0, "i", playerid); // Cria um timer de 4 segundos sem repetiçao
//========================================
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//Registro
new pArquivos[50];
format(pArquivos, sizeof(pArquivos), CONTASS, PegarNome(playerid));
if(dialogid == D_Registrar)
{
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, D_Registrar, DIALOG_STYLE_PASSWORD, "{FFFFFF}Bem vindo ao Essence DayZ \n\n{FFFFFF}Nome: {FF0000}%s \n\n{FFFFFF}Status: {FF0000}Nao Registrado(a)", "Registro", "", PegarNome(playerid));
DOF2_CreateFile(pArquivos);
DOF2_SetString(pArquivos, "Senha", inputtext);
DOF2_SaveFile();
SalvarPlayer(playerid);
SpawnPlayer(playerid);
pInfo[playerid][Spawn] = 1;
ShowPlayerDialog(playerid, D_Sexo, DIALOG_STYLE_MSGBOX,"> Escolha seu Sexo <","Escolha seu Sexo:","Masculino","Feminino");
return 1;
}
SendClientMessage(playerid, COLOR_ERROR, "Voce foi kickado por nao se registrar!");
KickP(playerid);
}
//Login
if(dialogid == D_Logar)
{
if(response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid,D_Logar,DIALOG_STYLE_PASSWORD, "{FFFFFF}Bem vindo ao Essence DayZ \n\n{FFFFFF}Nome: {00FF04}%s \n\n{FFFFFF}Status: {00FF04}Registrado(a)", "Entrar", "Sair", PegarNome(playerid));
if(!strcmp(DOF2_GetString(pArquivos, "Senha"), inputtext))
{
SendClientMessage(playerid, 0x00FF00FF, "Logado com susesso!");
CarregarPlayer(playerid);
SpawnPlayer(playerid);
pInfo[playerid][Spawn] = 0;
SetPlayerPos(playerid, coordSpawn[0], coordSpawn[1], coordSpawn[2]);
return 1;
}
if(pInfo[playerid][Errosenha] == 2)
{
SendClientMessage(playerid, COLOR_ERROR, "Voce sera kickado apos errar 3 vezes!");
KickP(playerid);
return 1;
}
pInfo[playerid][Errosenha]++;
ShowPlayerDialog(playerid, D_Logar, DIALOG_STYLE_PASSWORD, "Logando (x)", "{FFFFFF}A senha esta errada.\nPor Favor tente novamente!", "Entrar", "Sair");
return 1;
}
KickP(playerid);
}
if(dialogid == D_Sexo)
{
if(response)
{
SendClientMessage(playerid,-1,"{261BF7}Voce escolheu o Sexo Masculino.");
SetPlayerSkin(playerid, 144);
}
else
{
SendClientMessage(playerid,-1,"{F71BDE}Voce escolheu o Sexo Feminino.");
SetPlayerSkin(playerid, 56);
}
}
return 1;
}
//======================================CMDS======================================================
CMD:sexo(playerid, params[])
{
ShowPlayerDialog(playerid, D_Sexo, DIALOG_STYLE_MSGBOX,"> Escolha seu Sexo <","Escolha seu Sexo:","Masculino","Feminino");
return 1;
}
CMD:wearsurvival(playerid, params[])
{
SetPlayerAttachedObject(playerid,ID , 19904, 1, 0.099999, 0.056999, -0.009999, 2.999997, 88.000030, -177.800109, 1.381999, 1.000000, 1.364999, 0, 0);
SetPlayerHealth(playerid,300);
SendClientMessage(playerid,-1 , "suit active" ) ;
return 1;
}
CMD:survivaloff(playerid, params[])
{
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
SetPlayerHealth(playerid,100);
}
return 1;
}
// para testes
CMD:ls(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, "minha pika disgraça");
SetPlayerPos(playerid, 358.8322,-2072.4692,10.6953);
SendClientMessage(playerid, -1, " voce foi teleportado para ls ");
return 1;
}
CMD:nrg(playerid, params[])
{
new NRG[MAX_PLAYERS];
if(NRG[playerid] != 0) DestroyVehicle(NRG[playerid]);
new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x,y,z);
NRG[playerid] = CreateVehicle(560, x,y,z, 1.0, -1,-1, 99);
PutPlayerInVehicle(playerid, NRG[playerid], 0);
return 1;
}
CMD:morrer(playerid, params[])
{
SetPlayerHealth(playerid, 0);
return 1;
}
CMD:surv(playerid, params[])
{
EditAttachedObject(playerid, 19904);
SetPlayerAttachedObject(playerid, 0, 19904, 2);
return 1;
}
// para testes
//=======================================CMDS=====================================================
//=================[STOCKS DO SERVIDOR]================
stock PegarNome(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
return Name;
}
stock SalvarPlayer(playerid)
{
new pArquivos[50];
format(pArquivos, sizeof(pArquivos), CONTASS, PegarNome(playerid));
if(DOF2_FileExists(pArquivos))
{
DOF2_SetInt(pArquivos, "Level", GetPlayerScore(playerid));
DOF2_SetInt(pArquivos, "Skin", GetPlayerSkin(playerid));
DOF2_SetInt(pArquivos, "Spawn", pInfo[playerid][Spawn]);
GetPlayerPos(playerid, coordSpawn[0], coordSpawn[1], coordSpawn[2]);
DOF2_SetFloat(pArquivos, "PozicaoX", coordSpawn[0]);
DOF2_SetFloat(pArquivos, "PozicaoY", coordSpawn[1]);
DOF2_SetFloat(pArquivos, "PozicaoZ", coordSpawn[2]);
DOF2_SaveFile();
}
return 1;
}
stock CarregarPlayer(playerid)
{
new pArquivos[50];
format(pArquivos, sizeof(pArquivos), CONTASS, PegarNome(playerid));
if(DOF2_FileExists(pArquivos))
{
SetPlayerScore(playerid, DOF2_GetInt(pArquivos, "Level"));
SetPlayerSkin(playerid, DOF2_GetInt(pArquivos, "Skin"));
pInfo[playerid][Spawn] = DOF2_GetInt(pArquivos, "Spawn");
coordSpawn[0] = DOF2_GetFloat(pArquivos, "PozicaoX");
coordSpawn[1] = DOF2_GetFloat(pArquivos, "PozicaoY");
coordSpawn[2] = DOF2_GetFloat(pArquivos, "PozicaoZ");
}
return 1;
}
forward KickPlayer(playerid);
public KickPlayer(playerid)
{
Kick(playerid);
return 1;
}
forward HorasJogadas(playerid);
public HorasJogadas(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
SendClientMessage(playerid, -1, "Voce Acaba De Ganhar 1 De Score Por Estar Jogando A 5 Horas.");
return true;
}
forward Dialog_Sexo(playerid);
public Dialog_Sexo(playerid) // Chama o Timer e activa-o
{
ShowPlayerDialog(playerid, D_Sexo, DIALOG_STYLE_MSGBOX,"> Escolha seu Sexo <","Escolha seu Sexo:","Masculino","Feminino");
// Mostra o Dialog depois de 4 segundos
}
Aucun commentaire:
Enregistrer un commentaire