case DIALOG_NEON:
{
switch(listitem)
{
case 0:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 1:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 2:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
SetPVarInt(playerid, "neon", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
SetPVarInt(playerid, "neon", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 4:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
SetPVarInt(playerid, "neon", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 5:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
SetPVarInt(playerid, "neon", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6:
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
}
}
command(admins, playerid, params[])
{
if(PlayerInfo[playerid][pLog] == false)return true;
for(new i; i != MAX_PLAYERS; ++i) {
if(PlayerInfo[i][pAdmin] >= 1) {
format(dstring, sizeof dstring,"%s%s - %s \n", dstring, Nome(i), ANome[PlayerInfo[i][pAdmin]]);
}
}
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Administradores online", dstring, "Fechar", "");
return true;
}
format(dstring, sizeof dstring,"%s%s - %s \n", dstring, Nome(i), ANome[PlayerInfo[i][pAdmin]]);
format(dstring, sizeof (dstring),"%s%s - %s \n", dstring, Nome(i), ANome[PlayerInfo[i][pAdmin]]);
1Є, Nunca testei
2Є Acho que o erro estб aqui pawn Code:
pawn Code:
|
Entгo mas estou perdido para iniciar nгo sei por onde comeзar exemplo.
1. System Login/Register 2. Command Basic 3. Edit Map 4. ... Alguйm poderia me ajudar apenas para iniciar o gamemode (Gamemode Roleplay) |
O melhor modo que conheзo й a aplicaзгo de SetPlayerDrunkLevel atravйs de um timer rбpido, selecionando o mнnimo nнvel de embriaguez necessбrio para que o HUD desapareзa por um instante .
Exemplo: pawn Code:
Espero ter ajudado . |
Pessoal, compensa eu ir jб usando mysql ou fazer um gamemode bбsico com dof2,zcmd entre outras includes?
(Tenho um UCP desenvolvido praticamente) |
F:\Users\Phyton\Desktop\Projects\San Andreas Multiplayer\samp03x_svr_R2_win32\gamemodes\roleplay.pwn(297) : error 004: function "MySQL_CheckAccountPass" is not implemented
MySQL_CheckAccountPass(playerid, inputtext);
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 0:
{
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registro", "Vocк ainda nгo й registrado, \nPor favor digite uma senha:", "Logar", "Sair");
}
format(Query, sizeof(Query), "INSERT INTO `Contas` VALUES ('%s','%s','%d','%d','0','1500','2000');", _@PlayerName(playerid), inputtext);
mysql_function_query(connect, Query, false, "", "", "");
SendClientMessage(playerid, -1, "Registrado com sucesso!");
SetPlayerHealth(playerid, 100);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Parabйns, conta criada com sucesso! \nAgora digite sua senha para continuar:", "Logar", "Sair");
}
else
Kick(playerid);
return 1;
}
case 1:
{
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Vocк ja й registrado, \nPor favor digite sua senha:", "Logar", "Sair");
SendClientMessage(playerid,0xFF0000AA,"Senha incorreta digite-a novamente");
}
MySQL_CheckAccountPass(playerid, inputtext);
}
else
Kick(playerid);
return 1;
}
}
return 1;
}
Obrigado Dolby.
Estava vendo um tutorial aqui de register/login mysql. Mas agora estб dando esse erro |
#include a_samp
#include DOF2
forward RelogioUPs(playerid);
new
Text:ReloginhoUP;
//reloginhoup;
public OnGameModeInit()
{
ReloginhoUP = TextDrawCreate(518.000000, 4.000000, "~y~UP~p~: ~w~10~p~:~w~00");
TextDrawBackgroundColor(ReloginhoUP, 255);
TextDrawFont(ReloginhoUP, 1);
TextDrawLetterSize(ReloginhoUP, 0.460000, 1.799999);
TextDrawColor(ReloginhoUP, -1);
TextDrawSetOutline(ReloginhoUP, 1);
TextDrawSetProportional(ReloginhoUP, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
new nome[24], local[35];
GetPlayerName(playerid, nome, 24);
format(local, 35, "UP/%s.ini", nome);
DOF2_SetInt(local, "tempo", GetPVarInt(playerid, "tempo_up"));
DOF2_SaveFile();
DOF2_Exit();
return 1;
}
public OnGameModeExit()
{
return 1;
}
new minu2 = 0;
new TempoReloginho = 59;
new foicount1 = 1;
public RelogioUPs(playerid)
{
minu2++;
TempoReloginho--;
new string[50];
if(minu2>=59)
{
minu2 = 0;
foicount1 ++;
TempoReloginho = 59;
}
if(foicount1 == 1) format(string, 50,"~y~UP~p~: ~w~9~p~:~w~%d", TempoReloginho);
else if(foicount1 == 2) format(string, 50,"~y~UP~p~: ~w~8~p~:~w~%d", TempoReloginho);
else if(foicount1 == 3) format(string, 50,"~y~UP~p~: ~w~7~p~:~w~%d", TempoReloginho);
else if(foicount1 == 4) format(string, 50,"~y~UP~p~: ~w~6~p~:~w~%d", TempoReloginho);
else if(foicount1 == 5) format(string, 50,"~y~UP~p~: ~w~5~p~:~w~%d", TempoReloginho);
else if(foicount1 == 6) format(string, 50,"~y~UP~p~: ~w~4~p~:~w~%d", TempoReloginho);
else if(foicount1 == 7) format(string, 50,"~y~UP~p~: ~w~3~p~:~w~%d", TempoReloginho);
else if(foicount1 == 8) format(string, 50,"~y~UP~p~: ~w~2~p~:~w~%d", TempoReloginho);
else if(foicount1 == 9) format(string, 50,"~y~UP~p~: ~w~1~p~:~w~%d", TempoReloginho);
else if(foicount1 == 10) format(string, 50,"~y~UP~p~: ~w~0~p~:~w~%d", TempoReloginho);
TextDrawSetString(ReloginhoUP,string);
TextDrawShowForAll(ReloginhoUP);
if(foicount1 == 11)
{
foicount1 = 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
SendClientMessage(playerid, 0xFFFFFF, "UP !!!!!!!!");
}
}
return 1;
}
enum {
roupa, dinheiro, nivel, carro
}
enum
{
roupa,
dinheiro,
nivel,
carro
}
Queria uma dica de como faзo pra setar uma enum quando os players tiver off usando uma public?
|
metes dentro da funcao as variaveis que queres resetar por exemplo
enum fodase { posx, posy, posz, new zak[MAX_PLAYERS][fodase]; } forward resetenum(playerid); public resetenum(playerid) { zak[playerid][posx] = 0; //etc return 1; } fazes assim mas depende de como quiseres restar tu e que sabes os valores iniciais. |
Acho que voce nгo intendeu minha dъvida eu quero que a public set a enum para todos os players offline.
|
Na verdade vocк quer alterar o valor de uma variбvel para todos os jogadores, inclusive off-line. Para fazer isto basta criar um arquivo contendo todos os nomes dos jogadores, e depois percorrer linha por linha abrindo essas contas e alterando a variбvel desejada.
Abraзos. |