I need server owner with me know about scripting and have good experience about server owner
for roleplay server
add me on skype:chrisjoseph619
for roleplay server
add me on skype:chrisjoseph619
db_free_result(db_query(jugadores, "CREATE TABLE IF NOT EXISTS `datos` \
(`ID` INTEGER PRIMARY KEY AUTOINCREMENT, \
`Nombre` VARCHAR(24) NOT NULL, \
`Password` VARCHAR(24) NOT NULL, \
`Baneado` INTEGER NOT NULL, \
`Admin` INTEGER NOT NULL, \
`Nivel` INTEGER NOT NULL, \
`Experiencia` INTEGER NOT NULL, \
`Monedas de oro` INTEGER NOT NULL, \
`Dinero` INTEGER NOT NULL, \
`Cuenta bancaria` INTEGER NOT NULL, \
`Trabajo` INTEGER NOT NULL, \
`Faccion` INTEGER NOT NULL, \
`Rango faccion` INTEGER NOT NULL, \
`Policia` INTEGER NOT NULL, \
`Rango policia` INTEGER NOT NULL, \
`Pos X` FLOAT NOT NULL, \
`Pos Y` FLOAT NOT NULL, \
`Pos Z` FLOAT NOT NULL, \
`Pos R` FLOAT NOT NULL, \
`Skin` INTEGER NOT NULL, \
`Vida` FLOAT NOT NULL, \
`Chaleco` FLOAT NOT NULL, \
`Virtual World` INTEGER NOT NULL, \
`Interior` INTEGER NOT NULL, \
`Medicamentos` INTEGER NOT NULL, \
`Crack` INTEGER NOT NULL, \
`Materiales` INTEGER NOT NULL, \
`Sancion` INTEGER NOT NULL, \
`Tiempo sancion` INTEGER NOT NULL, \
`Sanciones` INTEGER NOT NULL, \
`Carcel` INTEGER NOT NULL, \
`Tiempo carcel` INTEGER NOT NULL, \
`Arrestos` INTEGER NOT NULL)"));
Untitled.pwn(74) : error 075: input line too long (after substitutions) Untitled.pwn(75) : error 037: invalid string (possibly non-terminated string) Untitled.pwn(75) : error 017: undefined symbol "CREATE" Untitled.pwn(75) : error 017: undefined symbol "TABLE" Untitled.pwn(75) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 5 Errors. |
CMD:test(playerid, params[])
{
new veh = GetPlayerVehicleID(playerid);
if(IsACopCar(veh))
{
SendClientMessage(playerid, -1, "Car is a cop car.");
return true;
}
return false;
}
public IsACopCar(vehicleid)
{
new vm = GetVehicleModel(vehicleid);
{
if(VehicleList[vm - 400][VehType] == VEHICLE_TYPE_GOV) return true;
}
return false;
}
enum VehicleListEnum {
VehModel,
VehName[50],
VehType,
VehWindows,
VehTrunk,
VehDoors,
VehPrice
};
new VehicleList[][VehicleListEnum] = {
{490, "FBI Rancher", VEHICLE_TYPE_GOV, 4, 1, 4, 000000},
};
// For example.
format(str4, sizeof(str4), DPATH, idx);
INI_ParseFile(str, "loaddoor_%s", .bExtra = true, .extra = idx, .bPassTag = true);
printf("id %i model %i", idx, DoorsInfo[idx][dModel]);
forward loaddoor_data(idx, tag[], name[], value[]);
public loaddoor_data(idx, tag[], name[], value[])
{
INI_Int("dUsed", DoorsInfo[idx][dUsed]);
INI_Int("dModel", DoorsInfo[idx][dModel]);
INI_Float("dX", DoorsInfo[idx][dX]);
INI_Float("dY", DoorsInfo[idx][dY]);
INI_Float("dZ", DoorsInfo[idx][dZ]);
INI_Float("dRX", DoorsInfo[idx][dRX]);
INI_Float("dRY", DoorsInfo[idx][dRY]);
INI_Float("dRZ", DoorsInfo[idx][dRZ]);
INI_Int("dInt", DoorsInfo[idx][dInt]);
INI_Int("dWorld", DoorsInfo[idx][dWorld]);
return 1;
}
[data]
dUsed = 1
dModel = 1504
dX = -1443.239868
dY = 2628.994628
dZ = 54.815917
dRX = 0.000000
dRY = 0.000000
dRZ = -35.500003
dInt = 0
dWorld = 0
PlayerInfo[playerid][pSkin] = SetPlayerSkin(playerid, dini_Int(pfile, "Skin")); |
SetSpawnInfo( playerid, 0, PlayerInfo[playerid][pSkin], x, y, z,angle, 0, 0, 0, 0, 0, 0 ); |
PlayerInfo[playerid][pSkin] = SetPlayerSkin(playerid, dini_Int(pfile, "Skin")); |
enum examplename
{
string[50],
stringClass,
}
new test[][exmaplename] =
{
{"Name1", 1},
{"name2", 2},
{"Name3", 1},
{"name4", 2},
}
CMD:desligar(playerid)
{
ongamemodeexit (pra salvar tudo e tals)
fecharoservidor
return 1;
}
TCP: 7777
UDP: 7777
echo Executing Server Config...
lanmode 0
rcon_password mypass
maxplayers 50
port 7777
hostname My Samp Server
gamemode0 grandlarc 1
filterscripts gl_actions gl_realtime gl_property gl_mapicon ls_elevator attachments skinchanger vspawner ls_mall ls_beachside
announce 0
chatlogging 0
weburl [url]http://ift.tt/1Q1jBbL;
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
language English
i also already change the gamemode name to grandlarc, lanmode from 0 to 1 , annouce 0 to 1 .
its dosen't work too.
///////////////////////
////////SWEMike////////
///////made this///////
////////script/////////
////////himself////////
///////////////////////
#include <a_samp>
#include "../include/gl_common.inc"
//--Settings--
#define DIZZ_WAIT 5 //Seconds to wait until player gets dizzy.
#define FULL_WAIT 40 //Seconds after becoming dizzy to wait until the player regains full control.
//------------
#define COLOR_NOTICE 0xFF7F00FF
forward RegainCons1(playerid);
forward RegainCons2(playerid);
forward DeathRC(playerid);
forward SimpleDrunk(playerid);
enum pInfo
{
pKO,
pDrunk,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
new Keys,up,down;
new Float:PlayerHP;
new RC1tim;
new RC2tim;
new WaitSeconds = DIZZ_WAIT * 1000;
new RCWaitSeconds = FULL_WAIT * 1000;
public OnFilterScriptInit()
{
print("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
print("| SWEMike's Knockout |");
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
//--TEST--
if(IsPlayerAdmin(playerid))
{
if(strcmp(cmd, "/knockout", true) == 0)
{
SetPlayerHealth(playerid, 20);
return 1;
}
}
return 0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
DeathRC(playerid);
return 1;
}
public OnPlayerUpdate(playerid)
{
GetPlayerKeys(playerid,Keys,up,down);
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pDrunk] == 1)
{
if(Keys == KEY_JUMP || Keys == KEY_SECONDARY_ATTACK || Keys == KEY_FIRE || Keys == KEY_ACTION || Keys == KEY_WALK)
{
SimpleDrunk(playerid);
}
}
}
new string[256];
GetPlayerHealth(playerid, PlayerHP);
if(PlayerHP <= 20 && PlayerInfo[playerid][pKO] == 0)
{
format(string, sizeof(string), "You have been knocked out, please wait %d seconds to regain your consciousness.", DIZZ_WAIT);
SendClientMessage(playerid, COLOR_NOTICE, string);
TogglePlayerControllable(playerid, true);
if(!IsPlayerInAnyVehicle(playerid))
{
ClearAnimations(playerid);
ApplyAnimation(playerid, "BEACH", "CRCKIDLE1", 4.1, 1, 1, 1, 1, 1);
}
RC1tim = SetTimerEx("RegainCons1", WaitSeconds, false, "i", playerid);
PlayerInfo[playerid][pKO] = 1;
}
else if(PlayerHP > 20 && PlayerInfo[playerid][pKO] == 1)
{
PlayerInfo[playerid][pKO] = 0;
SetPlayerDrunkLevel(playerid, 0);
ClearAnimations(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 OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
public RegainCons1(playerid)
{
SendClientMessage(playerid, COLOR_NOTICE, "You have regained your consciousness but you are very dizzy.");
TogglePlayerControllable(playerid, true);
SetPlayerDrunkLevel(playerid, 20000);
if(!IsPlayerInAnyVehicle(playerid))
{
ClearAnimations(playerid);
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
PlayerInfo[playerid][pDrunk] = 1;
}
RC2tim = SetTimerEx("RegainCons2", RCWaitSeconds, false, "i", playerid);
return 1;
}
public RegainCons2(playerid)
{
SendClientMessage(playerid, COLOR_NOTICE, "You have fully regained control over your body and can continue normally.");
SetPlayerDrunkLevel(playerid, 0);
PlayerInfo[playerid][pDrunk] = 0;
ClearAnimations(playerid);
return 1;
}
public DeathRC(playerid)
{
KillTimer(RC1tim);
KillTimer(RC2tim);
PlayerInfo[playerid][pKO] = 0;
SetPlayerDrunkLevel(playerid, 0);
PlayerInfo[playerid][pDrunk] = 0;
ClearAnimations(playerid);
return 1;
}
public SimpleDrunk(playerid)
{
ClearAnimations(playerid);
ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
}
CMD:debug(playerid, params [])
{
printf("Drugs: %d", Safes[1][Drugs]); // [1] = Safe ID from Database MYSQL.
return 1;
}
Drugs: 96
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]
//==================================================================
#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
}