Script/Mod tetejere:#include <dini>new file[128], name[24];OnPlayerConnect ala:GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(file, 128, \"skin/%s.ini\",name); if(!dini_Exists(file)) {dini_Create(file);dini_IntSet(file, \"Skin\", 0);} else if(dini_Exists(file)) { SetPlayerSkin(playerid, dini_Int(file, \"Skin\"));}OnPlayerDisconnect alla:GetPlayerName(playerid, name, MAX_PLAYER_NAME); //lekérdezzük, majd elmentjük egy változóban a játékos nevét format(file, 128, \"Skin/%s.ini\", name); //megformázzuk a fájlnak a nevét dini_IntSet(file, \"Skin\", GetPlayerSkin(playerid)); //átállítjuk a fájlban a szint értékét a játékos jelenlegi szintjére, majd késöbb ezt olvastatjuk be.
#include < a_samp >#include < dini > new p_Skinfile[ 40 ]; public OnPlayerDisconnect( playerid, reason ){ format( p_Skinfile, sizeof( p_Skinfile ), \"Skin/%s.ini\", p_Name( playerid ) ); if( dini_Exists( p_Skinfile ) ) { dini_Create( p_Skinfile ); dini_IntSet( p_Skinfile, \"Skinje\", GetPlayerSkin( playerid ) ); } else dini_IntSet( p_Skinfile, \"Skinje\", GetPlayerSkin( playerid ) ); return 1;}public OnPlayerSpawn( playerid ){ format( p_Skinfile, sizeof( p_Skinfile ), \"Skin/%s.ini\", p_Name( playerid ) ); if( dini_Exists( p_Skinfile ) ) { dini_Create( p_Skinfile ); dini_IntSet( p_Skinfile, \"Skinje\", GetPlayerSkin( playerid ) ); } else SetPlayerSkin( playerid, dini_Int( p_Skinfile, \"Skinje\" ) ); return 1;}stock p_Name( playerid ){new name[ MAX_PLAYER_NAME ]; GetPlayerName( playerid, name, MAX_PLAYER_NAME );return name;}
#include <a_samp>#include <dini>enum pAdat{Skin}public OnPlayerDisconnect(playerid, reason){ new pFile[128], id;format(pFile,sizeof(pFile),\"Jatekos/%s.ini\",Nev(id));if(fexist(pFile)){ dini_IntSet(pFile,\"Skin\", GetPlayerSkin(id));}}public OnPlayerConnect(playerid){ new pFile[128], id;format(pFile,sizeof(pFile),\"Jatekos/%s.ini\",Nev(id));if(fexist(pFile)){SetPlayerSkin(id,dini_Int(pFile,\"Skin\"));}}stock Nev(id){new Neve[MAX_PLAYER_NAME];GetPlayerName(id,Neve,sizeof(Neve));return Neve;}
#include <a_samp>#include <dini>new Name[MAX_PLAYER_NAME];new File[100];public OnPlayerDisconnect(playerid){ GetPlayerName(playerid, Name, sizeof Name); format(File, sizeof(File), \"/Skinnek/%s.ini\",Name); if(!dini_Exists(File)) { } else{ dini_IntSet(File, \"Skin\", GetPlayerSkin(playerid)); }}public OnPlayerConnect(playerid){ GetPlayerName(playerid, Name, sizeof(Name)); format(File, sizeof(File), \"/Skinnek/%s.ini\",Name); if(!dini_Exists(File)) { dini_Create(File); dini_IntSet(File, \"Skin\", 0); SetPlayerSkin(playerid, dini_Int(File, \"Score\")); } else{ SetPlayerSkin(playerid, dini_Int(File, \"Score\")); } return 1;}
Tessék!Teszteltem jó! #include <a_samp>#include <dini>enum pAdat{Skin}public OnPlayerDisconnect(playerid, reason){ new pFile[128], id;format(pFile,sizeof(pFile),\"Jatekos/%s.ini\",Nev(id));if(fexist(pFile)){ dini_IntSet(pFile,\"Skin\", GetPlayerSkin(id));}}public OnPlayerConnect(playerid){ new pFile[128], id;format(pFile,sizeof(pFile),\"Jatekos/%s.ini\",Nev(id));if(fexist(pFile)){SetPlayerSkin(id,dini_Int(pFile,\"Skin\"));}}stock Nev(id){new Neve[MAX_PLAYER_NAME];GetPlayerName(id,Neve,sizeof(Neve));return Neve;}
#include <a_samp>#include <dini>new Name[MAX_PLAYER_NAME];new File[100];public OnPlayerDisconnect(playerid){ GetPlayerName(playerid, Name, sizeof Name); format(File, sizeof(File), \"/Skinnek/%s.ini\",Name); if(!dini_Exists(File)) { } else{ dini_IntSet(File, \"Skin\", GetPlayerSkin(playerid)); }}public OnPlayerConnect(playerid){ GetPlayerName(playerid, Name, sizeof(Name)); format(File, sizeof(File), \"/Skinnek/%s.ini\",Name); if(!dini_Exists(File)) { dini_Create(File); dini_IntSet(File, \"Skin\", 0); SetPlayerSkin(playerid, dini_Int(File, \"Score\")); } else{ SetPlayerSkin(playerid, dini_Int(File, \"Score\")); } return 1;} sf mappába hozz létre egy Skinnek mappát!