[Ajuda] Please, help me. x1 de 2 pessoas :D
#1

Entгo pessoal, to com um problema no meu sistema de x1 de duas pessoas. Pode se dizer que ele tб 70% certo em minhas expectativas, mas o problema й que quando um player morre no x1, o outro player nгo й tirado do x1 automaticamente. E ele tem um sistema de salvamento dos dados, tipo "Duelos vencidos" "Duelos Perdidos" mas aparentemente tб meio bugado.

Meu cуdigo й este:

#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <DOF2>

#define Arma1 GivePlayerWeapon(playerid, 4, 9999);
#define Arma2 GivePlayerWeapon(playerid, 24, 9999);
#define Arma3 GivePlayerWeapon(playerid, 31, 9999);
#define Arma4 GivePlayerWeapon(playerid, 26, 9999);
#define Arma5 GivePlayerWeapon(playerid, 32, 9999);
#define Arma6 GivePlayerWeapon(playerid, 34, 9999);

#define rBox1 1
#define rAviso 2
#define rInfod 3

#define rDuelos "pDuelos/%s.ini" // Pasta

#define pDinheiro 15000
#define pScore 1

//Cor-Azul = {11CFCF}
//Cor-Vermelha = {FA0505}

new
pDuelo,
bool:eDuelo[MAX_PLAYERS],
pConvidou,
Desafiado,
String[200],
String2[200],
TempoSpawn[MAX_PLAYERS],
peDuelos[MAX_PLAYERS],
reDuelos[MAX_PLAYERS],
acDuelos[MAX_PLAYERS],
emDuelos[MAX_PLAYERS],
wDuelos[MAX_PLAYERS],
lDuelos[MAX_PLAYERS],
Text:TempoRestante,
Text:dMinutos
;

public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
for (new r = 0; r != MAX_PLAYERS; r++)
{
if(IsPlayerConnected®)
{
dSalvar®;
}
}
DOF2_Exit();
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == rBox1)
{
if(response)
{
KillTimer(TempoSpawn[pConvidou]);
pDuelo += 1;
acDuelos[playerid] += 1;
TogglePlayerControllable(pConvidou, true);
eDuelo[playerid] = true;
SetPlayerPos(playerid, -1454.8677,995.3799,1024.5774);
ResetPlayerWeapons(playerid);
SetPlayerTeam(playerid, 255);
SetPlayerArmour(playerid, 100);
SetPlayerInterior(playerid, 15);
SetPlayerHealth(playerid, 100);
format(String,sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}accepted the invitation of {FA0505}%s {11CFCF}for x1.", rNome(playerid), rNome(pConvidou));
SendClientMessageToAll(0xFFFF00AA, String);
TextDrawShowForPlayer(playerid, TempoRestante);
TextDrawShowForPlayer(pConvidou, TempoRestante);
TextDrawShowForPlayer(playerid, dMinutos);
TextDrawShowForPlayer(pConvidou, dMinutos);
Arma1
Arma2
Arma3
Arma4
Arma5
Arma6
}
if(!response)
{
format(String,sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}refused the x1 of {FA0505}%s", rNome(playerid), rNome(pConvidou));
SendClientMessageToAll(0xFFFF00AA, String);
TogglePlayerControllable(pConvidou, true);
pDuelo -= 1;
reDuelos[playerid] += 1;
eDuelo[pConvidou] = false;
SpawnPlayer(pConvidou);
KillTimer(TempoSpawn[pConvidou]);
}
}
return 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(eDuelo[killerid] == true || eDuelo[playerid] == true)
{
eDuelo[playerid] = false;
eDuelo[killerid] = false;
wDuelos[killerid] += 1;
lDuelos[playerid] += 1;
GivePlayerMoney(killerid, pDinheiro);
SetPlayerScore(killerid, GetPlayerScore(killerid) +pScore);
format(String,sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}won {FA0505}%s {11CFCF}in x1.", rNome(killerid), rNome(playerid), pDinheiro, pScore);
SendClientMessageToAll(0xFFFFFFAA, String);
SendClientMessage(killerid, -1 , "[INFO-X1]Wait 5 seconds...");
SetTimerEx("SpawnDuelo", 5000, false, "d", killerid);
TextDrawHideForPlayer(playerid, TempoRestante);
TextDrawHideForPlayer(killerid, TempoRestante);
TextDrawHideForPlayer(playerid, dMinutos);
TextDrawHideForPlayer(killerid, dMinutos);
ForceClassSelection(playerid);
}
return 0;
}

public OnPlayerConnect(playerid)
{
eDuelo[playerid] = false;
peDuelos[playerid] = 0;
reDuelos[playerid] = 0;
acDuelos[playerid] = 0;
emDuelos[playerid] = 0;
wDuelos[playerid] = 0;
lDuelos[playerid] = 0;
new Arq[50];
format(Arq, sizeof(Arq), rDuelos, rNome(playerid));
if (DOF2_FileExists(Arq))
{
dCarregar(playerid);
}
else
{
dSalvar(playerid);
}
return 0;
}

public OnPlayerDisconnect(playerid, reason)
{
dSalvar(playerid);
if(eDuelo[Desafiado] == true)
{
eDuelo[Desafiado] = false;
pDuelo -= 1;
SpawnPlayer(pConvidou);
KillTimer(TempoSpawn[pConvidou]);
}
if(eDuelo[pConvidou] == true)
{
eDuelo[pConvidou] = false;
pDuelo -= 1;
SpawnPlayer(Desafiado);
KillTimer(TempoSpawn[pConvidou]);
}
return 0;
}

CMD:duel(playerid, params[]) return cmd_duelar(playerid, params);
CMD:duelo(playerid, params[]) return cmd_duelar(playerid, params);
CMD1(playerid, params[]) return cmd_duelar(playerid, params);

CMD:duelar(playerid, params[])
{
if(pDuelo == 2) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]Wait for empty arena, by now contains two players dueling.");
if(eDuelo[playerid] == true) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]You are already in the duel.");
if(sscanf(params, "d", Desafiado)) return SendClientMessage(playerid, 0xFFA500AA, "{11CFCF}[INFO-X1] ~> /duel [ID of the player to be invited]");
if(!IsPlayerConnected(Desafiado)) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]Player Offline.");
if(eDuelo[Desafiado] == true) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]This player is already in a duel.");
if(Desafiado == playerid) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]You can not duel yourself.");
format(String, sizeof(String), "{11CFCF}[INFO-X1]You invited the player to go x1 with you!", rNome(Desafiado));
SendClientMessage(playerid, 0x00BFFFAA, String);
pConvidou = playerid;
SetPlayerPos(playerid, -1346.6993,994.9420,1024.0092);
SetPlayerInterior(playerid, 15);
TogglePlayerControllable(playerid, false);
eDuelo[playerid] = true;
pDuelo += 1;
ResetPlayerWeapons(playerid);
SetPlayerTeam(playerid, 255);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
Arma1
Arma2
Arma3
Arma4
Arma5
Arma6
format(String2,sizeof(String2), "{11CFCF}[INFO-X1]You are invited to go x1 with the player {FA0505}%s\n\n{11CFCF}Award: $%d + %d Score\n\nDo you accept?", rNome(playerid), pDinheiro, pScore);
ShowPlayerDialog(Desafiado, rBox1, DIALOG_STYLE_MSGBOX, "{11CFCF}[INFO-X1]You have been challenged.", String2, "Yes", "Not");
TempoSpawn[playerid] = SetTimerEx("AguardandoResposta", 10000, false, "d", playerid);
SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]The guest player will have 10 seconds to answer!");
peDuelos[Desafiado] += 1;
return 1;
}

CMD:dinfo(playerid)
{
SendClientMessage(playerid, 0x00BFFFAA, "<<<<<<< Information of your duels >>>>>>>");
format(String, sizeof(String), "{11CFCF}Duel Requests: {FA0505}%d", peDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Rejected: {FA0505}%d", reDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Accepted: {FA0505}%d", acDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Drawn: {FA0505}%d", emDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Won: {FA0505}%d", wDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Lost: {FA0505}%d", lDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
SendClientMessage(playerid, 0x00BFFFAA, "{11CFCF}[INFO-X1]The information is saved automatically when you connect!");
return 1;
}

forward AguardandoResposta(playerid);
public AguardandoResposta(playerid)
{
SpawnPlayer(playerid);
KillTimer(TempoSpawn[playerid]);
SetPlayerInterior(playerid, 15);
format(String, sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}refused the invitation of {FA0505}%s", rNome(Desafiado), rNome(playerid));
SendClientMessageToAll(0xFFFF00AA, String);
TogglePlayerControllable(playerid, true);
pDuelo -= 1;
eDuelo[playerid] = false;
reDuelos[Desafiado] += 1;
format(String2, sizeof(String2), "{11CFCF}The maximum waiting time to accept the request, finished.\n\n{11CFCF}You did not accept the request to duel with the player {FA0505}%s.", rNome(playerid));
ShowPlayerDialog(Desafiado, rAviso, DIALOG_STYLE_MSGBOX, "Information of Duels", String2, "Close", "");
return 1;
}

forward SpawnDuelo(playerid);
public SpawnDuelo(playerid)
{
SpawnPlayer(playerid);
pDuelo = 0;
return 1;
}

stock rNome(playerid)
{
new rnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, rnome, MAX_PLAYER_NAME);
return rnome;
}

stock dSalvar(playerid)
{
new Arq[50];
format(Arq, sizeof(Arq), rDuelos, rNome(playerid));
if (DOF2_FileExists(Arq))
{
DOF2_SetInt(Arq, "Pedidos de Duelo", peDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Recusados", reDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Aceitos", acDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Empatados", emDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Vencidos", wDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Perdidos", lDuelos[playerid]);
DOF2_SaveFile();
}
else
{
DOF2_CreateFile(Arq);
DOF2_SetInt(Arq, "Pedidos de Duelo", peDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Recusados", reDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Aceitos", acDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Empatados", emDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Vencidos", wDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Perdidos", lDuelos[playerid]);
DOF2_SaveFile();
}
return 1;
}

stock dCarregar(playerid)
{
new Arq[50];
format(Arq, sizeof(Arq), rDuelos, rNome(playerid));
if (DOF2_FileExists(Arq))
{
peDuelos[playerid] = DOF2_GetInt(Arq, "Pedidos de Duelo");
reDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Recusados");
acDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Aceitos");
emDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Empatados");
wDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Vencidos");
lDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Perdidos");
}
return 1;
}


Obrigado
Reply
#2

poe no comeзo : [*pawn] e no final [*pawn]
fica melhor de entender

no lugar do * poe / ex : [/pawn]
Reply
#3

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <DOF2>

#define Arma1 GivePlayerWeapon(playerid, 4, 9999);
#define Arma2 GivePlayerWeapon(playerid, 24, 9999);
#define Arma3 GivePlayerWeapon(playerid, 31, 9999);
#define Arma4 GivePlayerWeapon(playerid, 26, 9999);
#define Arma5 GivePlayerWeapon(playerid, 32, 9999);
#define Arma6 GivePlayerWeapon(playerid, 34, 9999);

#define rBox1 1
#define rAviso 2
#define rInfod 3

#define rDuelos "pDuelos/%s.ini" // Pasta

#define pDinheiro 15000
#define pScore 1

//Cor-Azul = {11CFCF}
//Cor-Vermelha = {FA0505}

new
pDuelo,
bool:eDuelo[MAX_PLAYERS],
pConvidou,
Desafiado,
String[200],
String2[200],
TempoSpawn[MAX_PLAYERS],
peDuelos[MAX_PLAYERS],
reDuelos[MAX_PLAYERS],
acDuelos[MAX_PLAYERS],
emDuelos[MAX_PLAYERS],
wDuelos[MAX_PLAYERS],
lDuelos[MAX_PLAYERS],
Text:TempoRestante,
Text:dMinutos
;

public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
for (new r = 0; r != MAX_PLAYERS; r++)
{
if(IsPlayerConnected(r))
{
dSalvar(r);
}
}
DOF2_Exit();
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == rBox1)
{
if(response)
{
KillTimer(TempoSpawn[pConvidou]);
pDuelo += 1;
acDuelos[playerid] += 1;
TogglePlayerControllable(pConvidou, true);
eDuelo[playerid] = true;
SetPlayerPos(playerid, -1454.8677,995.3799,1024.5774);
ResetPlayerWeapons(playerid);
SetPlayerTeam(playerid, 255);
SetPlayerArmour(playerid, 100);
SetPlayerInterior(playerid, 15);
SetPlayerHealth(playerid, 100);
format(String,sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}accepted the invitation of {FA0505}%s {11CFCF}for x1.", rNome(playerid), rNome(pConvidou));
SendClientMessageToAll(0xFFFF00AA, String);
TextDrawShowForPlayer(playerid, TempoRestante);
TextDrawShowForPlayer(pConvidou, TempoRestante);
TextDrawShowForPlayer(playerid, dMinutos);
TextDrawShowForPlayer(pConvidou, dMinutos);
Arma1
Arma2
Arma3
Arma4
Arma5
Arma6
}
if(!response)
{
format(String,sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}refused the x1 of {FA0505}%s", rNome(playerid), rNome(pConvidou));
SendClientMessageToAll(0xFFFF00AA, String);
TogglePlayerControllable(pConvidou, true);
pDuelo -= 1;
reDuelos[playerid] += 1;
eDuelo[pConvidou] = false;
SpawnPlayer(pConvidou);
KillTimer(TempoSpawn[pConvidou]);
}
}
return 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{
if(eDuelo[killerid] == true || eDuelo[playerid] == true)
{
eDuelo[playerid] = false;
eDuelo[killerid] = false;
wDuelos[killerid] += 1;
lDuelos[playerid] += 1;
GivePlayerMoney(killerid, pDinheiro);
SetPlayerScore(killerid, GetPlayerScore(killerid) +pScore);
format(String,sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}won {FA0505}%s {11CFCF}in x1.", rNome(killerid), rNome(playerid), pDinheiro, pScore);
SendClientMessageToAll(0xFFFFFFAA, String);
SendClientMessage(killerid, -1 , "[INFO-X1]Wait 5 seconds...");
SetTimerEx("SpawnDuelo", 5000, false, "d", killerid);
TextDrawHideForPlayer(playerid, TempoRestante);
TextDrawHideForPlayer(killerid, TempoRestante);
TextDrawHideForPlayer(playerid, dMinutos);
TextDrawHideForPlayer(killerid, dMinutos);
ForceClassSelection(playerid);
}
return 0;
}

public OnPlayerConnect(playerid)
{
eDuelo[playerid] = false;
peDuelos[playerid] = 0;
reDuelos[playerid] = 0;
acDuelos[playerid] = 0;
emDuelos[playerid] = 0;
wDuelos[playerid] = 0;
lDuelos[playerid] = 0;
new Arq[50];
format(Arq, sizeof(Arq), rDuelos, rNome(playerid));
if (DOF2_FileExists(Arq))
{
dCarregar(playerid);
}
else
{
dSalvar(playerid);
}
return 0;
}

public OnPlayerDisconnect(playerid, reason)
{
dSalvar(playerid);
if(eDuelo[Desafiado] == true)
{
eDuelo[Desafiado] = false;
pDuelo -= 1;
SpawnPlayer(pConvidou);
KillTimer(TempoSpawn[pConvidou]);
}
if(eDuelo[pConvidou] == true)
{
eDuelo[pConvidou] = false;
pDuelo -= 1;
SpawnPlayer(Desafiado);
KillTimer(TempoSpawn[pConvidou]);
}
return 0;
}

CMD:duel(playerid, params[]) return cmd_duelar(playerid, params);
CMD:duelo(playerid, params[]) return cmd_duelar(playerid, params);
CMD1(playerid, params[]) return cmd_duelar(playerid, params);

CMD:duelar(playerid, params[])
{
if(pDuelo == 2) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]Wait for empty arena, by now contains two players dueling.");
if(eDuelo[playerid] == true) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]You are already in the duel.");
if(sscanf(params, "d", Desafiado)) return SendClientMessage(playerid, 0xFFA500AA, "{11CFCF}[INFO-X1] ~> /duel [ID of the player to be invited]");
if(!IsPlayerConnected(Desafiado)) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]Player Offline.");
if(eDuelo[Desafiado] == true) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]This player is already in a duel.");
if(Desafiado == playerid) return SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]You can not duel yourself.");
format(String, sizeof(String), "{11CFCF}[INFO-X1]You invited the player to go x1 with you!", rNome(Desafiado));
SendClientMessage(playerid, 0x00BFFFAA, String);
pConvidou = playerid;
SetPlayerPos(playerid, -1346.6993,994.9420,1024.0092);
SetPlayerInterior(playerid, 15);
TogglePlayerControllable(playerid, false);
eDuelo[playerid] = true;
pDuelo += 1;
ResetPlayerWeapons(playerid);
SetPlayerTeam(playerid, 255);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
Arma1
Arma2
Arma3
Arma4
Arma5
Arma6
format(String2,sizeof(String2), "{11CFCF}[INFO-X1]You are invited to go x1 with the player {FA0505}%s\n\n{11CFCF}Award: $%d + %d Score\n\nDo you accept?", rNome(playerid), pDinheiro, pScore);
ShowPlayerDialog(Desafiado, rBox1, DIALOG_STYLE_MSGBOX, "{11CFCF}[INFO-X1]You have been challenged.", String2, "Yes", "Not");
TempoSpawn[playerid] = SetTimerEx("AguardandoResposta", 10000, false, "d", playerid);
SendClientMessage(playerid, 0xA9A9A9AA, "{11CFCF}[INFO-X1]The guest player will have 10 seconds to answer!");
peDuelos[Desafiado] += 1;
return 1;
}

CMD:dinfo(playerid)
{
SendClientMessage(playerid, 0x00BFFFAA, "<<<<<<< Information of your duels >>>>>>>");
format(String, sizeof(String), "{11CFCF}Duel Requests: {FA0505}%d", peDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Rejected: {FA0505}%d", reDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Accepted: {FA0505}%d", acDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Drawn: {FA0505}%d", emDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Won: {FA0505}%d", wDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
format(String, sizeof(String), "{11CFCF}Duels Lost: {FA0505}%d", lDuelos[playerid]);
SendClientMessage(playerid, 0xB9BCCCAA, String);
SendClientMessage(playerid, 0x00BFFFAA, "{11CFCF}[INFO-X1]The information is saved automatically when you connect!");
return 1;
}

forward AguardandoResposta(playerid);
public AguardandoResposta(playerid)
{
SpawnPlayer(playerid);
KillTimer(TempoSpawn[playerid]);
SetPlayerInterior(playerid, 15);
format(String, sizeof(String), "{11CFCF}[INFO-X1]The player {FA0505}%s {11CFCF}refused the invitation of {FA0505}%s", rNome(Desafiado), rNome(playerid));
SendClientMessageToAll(0xFFFF00AA, String);
TogglePlayerControllable(playerid, true);
pDuelo -= 1;
eDuelo[playerid] = false;
reDuelos[Desafiado] += 1;
format(String2, sizeof(String2), "{11CFCF}The maximum waiting time to accept the request, finished.\n\n{11CFCF}You did not accept the request to duel with the player {FA0505}%s.", rNome(playerid));
ShowPlayerDialog(Desafiado, rAviso, DIALOG_STYLE_MSGBOX, "Information of Duels", String2, "Close", "");
return 1;
}

forward SpawnDuelo(playerid);
public SpawnDuelo(playerid)
{
SpawnPlayer(playerid);
pDuelo = 0;
return 1;
}

stock rNome(playerid)
{
new rnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, rnome, MAX_PLAYER_NAME);
return rnome;
}

stock dSalvar(playerid)
{
new Arq[50];
format(Arq, sizeof(Arq), rDuelos, rNome(playerid));
if (DOF2_FileExists(Arq))
{
DOF2_SetInt(Arq, "Pedidos de Duelo", peDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Recusados", reDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Aceitos", acDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Empatados", emDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Vencidos", wDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Perdidos", lDuelos[playerid]);
DOF2_SaveFile();
}
else
{
DOF2_CreateFile(Arq);
DOF2_SetInt(Arq, "Pedidos de Duelo", peDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Recusados", reDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Aceitos", acDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Empatados", emDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Vencidos", wDuelos[playerid]);
DOF2_SetInt(Arq, "Duelos Perdidos", lDuelos[playerid]);
DOF2_SaveFile();
}
return 1;
}

stock dCarregar(playerid)
{
new Arq[50];
format(Arq, sizeof(Arq), rDuelos, rNome(playerid));
if (DOF2_FileExists(Arq))
{
peDuelos[playerid] = DOF2_GetInt(Arq, "Pedidos de Duelo");
reDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Recusados");
acDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Aceitos");
emDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Empatados");
wDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Vencidos");
lDuelos[playerid] = DOF2_GetInt(Arq, "Duelos Perdidos");
}
return 1;
}
Entre o seu codigo coloque [ pawn] codigo [ /pawn] mas nao coloque os espaзos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)