SA-MP Forums Archive
[DUV]Money - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [DUV]Money (/showthread.php?tid=119482)



[DUV]Money - netado - 08.01.2010

Eae galera. xD

tipo quando aperto TAB mostra o [id/nome/score/ping] ai o score eu queria q mostrasse o tanto de grana q 1 player tem.Eu testie hoje eu tava com 1500 reais la e no score tava 0.

Alguem pode me ajudar por favor.

Obrigado galera


Re: [DUV]Money - [O_o]Davidovich - 08.01.2010

pawn Code:
forward ScoreUpdate();

public OnGameModeInit()
{
  SetTimer("ScoreUpdate",4000,1);
  return 1;
}

public ScoreUpdate()
{
  for(new i = 0; i < MAX_UPDATES; i++)
  {
    SetPlayerScore(i,GetPlayerMoney[i]);
  }
  return 1;
}
Acho que funciona
No caso ele atualizaria o score do player de 4 em 4 segundos, pra nгo dar lag.


Re: [DUV]Money - netado - 08.01.2010

@EDIT

C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(486) : error 017: undefined symbol "MAX_UPDATES"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : warning 215: expression has no effect
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.



Re: [DUV]Money - speliarmos - 08.01.2010

Quote:
Originally Posted by netado
@EDIT

C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(486) : error 017: undefined symbol "MAX_UPDATES"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : warning 215: expression has no effect
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Substitua SetPlayerScore(i,GetPlayerMoney[i]); por SetPlayerScore(i,GetPlayerMoney(i));
onde tiver MAX_UPDATES substitua por MAX_PLAYERS.


Re: [DUV]Money - Sucre Pleasure - 08.01.2010

Quote:
Originally Posted by [VGS
speliarmos_OC ]
Quote:
Originally Posted by netado
@EDIT

C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(486) : error 017: undefined symbol "MAX_UPDATES"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : warning 215: expression has no effect
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Substitua SetPlayerScore(i,GetPlayerMoney[i]); por SetPlayerScore(i,GetPlayerMoney(i));
onde tiver MAX_UPDATES substitua por MAX_PLAYERS.
Speli, nгo estб errado o que vocк fez, mas se ele fizer com MAX_PLAYERS, vai estar usando uma array de 500 slots, iram sobrar muitos nгo й?

Aconselho a fazer assim:

pawn Code:
#define SLOTS 200

public OnGameModeInit()
{
  SetTimer("ScoreUpdate",4000,1);
  return 1;
}

forward ScoreUpdate();
public ScoreUpdate()
{
  for(new i = 0; i < SLOTS; i++)
  {
    SetPlayerScore(i,GetPlayerMoney(i));
  }
  return 1;
}
._.


Re: [DUV]Money - speliarmos - 08.01.2010

Quote:
Originally Posted by [SFP
$ucr3[CX] « ]
Quote:
Originally Posted by [VGS
speliarmos_OC ]
Quote:
Originally Posted by netado
@EDIT

C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(486) : error 017: undefined symbol "MAX_UPDATES"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : warning 215: expression has no effect
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Substitua SetPlayerScore(i,GetPlayerMoney[i]); por SetPlayerScore(i,GetPlayerMoney(i));
onde tiver MAX_UPDATES substitua por MAX_PLAYERS.
Speli, nгo estб errado o que vocк fez, mas se ele fizer com MAX_PLAYERS, vai estar usando uma array de 500 slots, iram sobrar muitos nгo й?

Aconselho a fazer assim:

pawn Code:
#define SLOTS 200

public OnGameModeInit()
{
  SetTimer("ScoreUpdate",4000,1);
  return 1;
}

forward ScoreUpdate();
public ScoreUpdate()
{
  for(new i = 0; i < SLOTS; i++)
  {
    SetPlayerScore(i,GetPlayerMoney[i]);
  }
  return 1;
}
._.
sim claro, й melhor definindo o valor, a nгo ser que no servidor dele possa entrar mais de 200 players .-. ...acho dificil, mas й melhor do seu jeito.. ;**


Re: [DUV]Money - Sucre Pleasure - 08.01.2010

Quote:
Originally Posted by [VGS
speliarmos_OC ]
Quote:
Originally Posted by [SFP
$ucr3[CX] « ]
Quote:
Originally Posted by [VGS
speliarmos_OC ]
Quote:
Originally Posted by netado
@EDIT

C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(486) : error 017: undefined symbol "MAX_UPDATES"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : warning 215: expression has no effect
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Carlos\Meus documentos\Downloads\gta server0.3a\gamemodes\netadopt1.pwn(48 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Substitua SetPlayerScore(i,GetPlayerMoney[i]); por SetPlayerScore(i,GetPlayerMoney(i));
onde tiver MAX_UPDATES substitua por MAX_PLAYERS.
Speli, nгo estб errado o que vocк fez, mas se ele fizer com MAX_PLAYERS, vai estar usando uma array de 500 slots, iram sobrar muitos nгo й?

Aconselho a fazer assim:

pawn Code:
#define SLOTS 200

public OnGameModeInit()
{
  SetTimer("ScoreUpdate",4000,1);
  return 1;
}

forward ScoreUpdate();
public ScoreUpdate()
{
  for(new i = 0; i < SLOTS; i++)
  {
    SetPlayerScore(i,GetPlayerMoney[i]);
  }
  return 1;
}
._.
sim claro, й melhor definindo o valor, a nгo ser que no servidor dele possa entrar mais de 200 players .-. ...acho dificil, mas й melhor do seu jeito.. ;**
No momento existem 2 online. O servidor dele tem 15 slots...Serб que chega a 200? :b


Re: [DUV]Money - [O_o]Davidovich - 08.01.2010

Lol daonde eu tirei MAX_UPDATES? @_@
E pus [i.] como se fosse uma variavel, fail xP