#include <a_samp>#include <dini> enum pAdat{score}new nev[MAX_PLAYER_NAME];new loc[100];new PlayerAdat[MAX_PLAYERS][pAdat];public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" Pontmento\");print(\"--------------------------------------\\n\");return 1;}public OnFilterScriptExit(){return 1;} public OnPlayerConnect(playerid){GetPlayerName(playerid, nev, sizeof(nev)); format(loc, sizeof(loc), \"/scores/%s.ini\",nev); if(!dini_Exists(loc)){ dini_Create(loc); dini_IntSet(loc, \"Score\", 0); PlayerAdat[playerid][score] = dini_Int(loc, \"Score\"); }else{ PlayerAdat[playerid][score] = dini_Int(loc, \"Score\"); SetPlayerScore(playerid,PlayerAdat[playerid][score]); } return 1;}public OnPlayerDisconnect(playerid, reason){PlayerAdat[playerid][score] = GetPlayerScore(playerid);GetPlayerName(playerid,nev,sizeof(nev));format(loc,sizeof(loc),\"/scores/%s.ini\",nev);if(!dini_Exists(loc)){dini_Create(loc);dini_IntSet(loc, \"Score\", 0);}else{dini_IntSet(loc,\"Score\",PlayerAdat[playerid][score]);}return 1;}
Heló!Valaki tudna segíteni a pontmentéssel? Régebben mentett de most nem public OnPlayerConnect(playerid){ dini_IntSet(loc, \"Score\", 0); // Ezt vedd ki onnan!}public OnPlayerDisconnect(playerid, reason){dini_IntSet(loc, \"Score\", 0); //wtf? azért ír nulla pontot mivel azt csináltad meg hogy ha lemegy a gyerek akkor átállítja a score-ját 0-ra!} Rendesen megcsináltam a scores mappát bele is teszi a dini filét de csak 0 pontot ír...
public OnPlayerConnect(playerid){ dini_IntSet(loc, \"Score\", 0); // Ezt vedd ki onnan!}public OnPlayerDisconnect(playerid, reason){dini_IntSet(loc, \"Score\", 0); //wtf? azért ír nulla pontot mivel azt csináltad meg hogy ha lemegy a gyerek akkor átállítja a score-ját 0-ra!}
dini_IntSet(loc, \"Score\", PlayerAdat[playerid][score]);
PlayerAdat[playerid][score] += 1;
PlayerAdat[playerid][score] += 1;SetPlayerScore(killerid,GetPlayerScore(killerid) +1);
PlayerAdat[playerid][score] = dini_Int(loc, \"Score\");SetPlayerScore(playerid,PlayerAdat[playerid][score]);
#include <a_samp>#include <dini> enum pAdat{score}new nev[MAX_PLAYER_NAME];new loc[100];new PlayerAdat[MAX_PLAYERS][pAdat];public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" Pontmento\");print(\"--------------------------------------\\n\");return 1;}public OnFilterScriptExit(){return 1;} public OnPlayerConnect(playerid){GetPlayerName(playerid, nev, sizeof(nev)); format(loc, sizeof(loc), \"/scores/%s.ini\",nev); if(!dini_Exists(loc)){ dini_Create(loc); PlayerAdat[playerid][score] = dini_Int(loc, \"Score\"); }else{ PlayerAdat[playerid][score] = dini_Int(loc, \"Score\");SetPlayerScore(playerid,PlayerAdat[playerid][score]); } return 1;}public OnPlayerDeath(playerid, killerid, reason){ PlayerAdat[killerid][score] += 1;return 1;} public OnPlayerDisconnect(playerid, reason){PlayerAdat[playerid][score] = GetPlayerScore(playerid);GetPlayerName(playerid,nev,sizeof(nev));format(loc,sizeof(loc),\"/scores/%s.ini\",nev);if(!dini_Exists(loc)){dini_Create(loc);dini_IntSet(loc, \"Score\", PlayerAdat[playerid][score]);}else{dini_IntSet(loc,\"Score\",PlayerAdat[playerid][score]);}return 1;}