SA-MP Forums Archive
Ayuda con save guns - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Ayuda con save guns (/showthread.php?tid=156322)



Ayuda con save guns - SeQualX - 22.06.2010

Buenas quisiera saber si alguien me puede decir de que manera puedo hacer que las armas de los players se guarden cantidad de balas y pues el Id del arma ojala me puedan ayudar gracias...


Re: Ayuda con save guns - TheChaoz - 22.06.2010

podes usar esto:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  new file[256], name[MAX_PLAYER_NAME], weapon[13][2], str[30], str2[30];
  GetPlayerName(playerid, name, sizeof(name));
  format(file, sizeof(file); "\%s.txt", name);
  if(!dini_Exists(file)) dini_Create(file);
  for(i=0; i<13;i++){
    GetPlayerWeaponData(playerid, i,weapon[i][0], weapon[i][1]);
    format(str, sizeof(str), "Arma%d", i);
    format(str2, sizeof(str2), "Balas%d", i);
    dini_IntSet(file, str, weapon[i][0]);
    dini_IntSet(file, str2, weapon[i][1]);
  }

  return 1;
}
espero que te sirva


Re: Ayuda con save guns - SeQualX - 24.06.2010

me voto 4 errores en una sola linea estos son

pawn Код:
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : warning 215: expression has no effect
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : warning 215: expression has no effect
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : fatal error 107: too many error messages on one line
format(file, sizeof(file); "\%s.txt", name); esa es la linea del error



Re: Ayuda con save guns - leaNN! - 24.06.2010

pawn Код:
ormat(file, sizeof(file) "\%s.txt", name);
Prueba asi.


Re: Ayuda con save guns - SeQualX - 24.06.2010

pawn Код:
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : error 001: expected token: ",", but found "-string-"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : warning 215: expression has no effect
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : warning 215: expression has no effect
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4851) : fatal error 107: too many error messages on one line
en la linea que me dijiste format(file, sizeof(file) "\%s.txt", name);


Re: Ayuda con save guns - Cesar_Biker - 24.06.2010

format(file, sizeof(file), "\%s.txt", name);



Re: Ayuda con save guns - SeQualX - 24.06.2010

pawn Код:
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : warning 205: redundant code: constant expression is zero
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : warning 215: expression has no effect
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : fatal error 107: too many error messages on one line
linea de los errores = for(i=0; i<13;i++){



Re: Ayuda con save guns - Cesar_Biker - 24.06.2010

cambiar por
Код:
for(new i = 0; i < 13; i++)(espacio){



Re: Ayuda con save guns - SeQualX - 24.06.2010

pawn Код:
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : error 017: undefined symbol "espacio"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4854) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4855) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4856) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4857) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4858) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4864) : warning 225: unreachable code
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4984) : warning 209: function "JB_OnPlayerDisconnect" should return a value
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(9032) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(55514) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
me voto ahora mas errores y warnings linea del error = for(new i = 0; i < 13; i++)(espacio){


Re: Ayuda con save guns - Cesar_Biker - 24.06.2010

Quote:
Originally Posted by SeQualX
pawn Код:
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4853) : error 017: undefined symbol "espacio"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4854) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4855) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4856) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4857) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4858) : error 017: undefined symbol "i"
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4864) : warning 225: unreachable code
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(4984) : warning 209: function "JB_OnPlayerDisconnect" should return a value
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(9032) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Andres\Mis documentos\GTA san andreas multiplayer\servermio\1Ciudad Metropolis-RP\gamemodes\CM-RP.pwn(55514) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
me voto ahora mas errores y warnings linea del error = for(new i = 0; i < 13; i++)(espacio){
El "(espacio)" es para que pongas un espacio.
Prueba a ver.