SA-MP Forums Archive
[DUDA]їComo puedo guardar un numero? - 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: [DUDA]їComo puedo guardar un numero? (/showthread.php?tid=470334)



[DUDA]їComo puedo guardar un numero? - chusothe41 - 17.10.2013

їComo puedo guardar el numero de vehiculos que se han creado?
Es decir tengo este codigo
pawn Код:
stock VehiclePath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH2,playername);
    return string;
}
Lo que hace es crear el .ini con el nombre del jugador...
їcomo puedo hacer que en vez del nombre de un jugador sea un numero empezando de 0 a (infinito) segun se vallan comprando coches?


Respuesta: [DUDA]їComo puedo guardar un numero? - OTACON - 17.10.2013

https://sampwiki.blast.hk/wiki/GetPlayerVehicleID

pawn Код:
stock VehiclePath(playerid) {
    new string[128];
    format(string,sizeof(string),PATH2,GetPlayerVehicleID(playerid));
    return string;
}



Re: [DUDA]їComo puedo guardar un numero? - chusothe41 - 21.10.2013

Eso me es inutil, ya que si el servidor se cae y no hay ningun coche cuando el jugador se compre un coche puede duplicar las id y luego ya tengo el lio armado XD