Messi\" post=\"155852\" timestamp=\"1310365941\"]És lementeni ki fogja az idejét ? UI: Ebbõl halászd kiKöszönd kurtának [/quote]Ebbõl max azt tudja meg, hogy MYSQL kell hozzáNeeeemakarom még1x megírni...1 szimpla kérdés.. mentse, hogy mennyit volt a szerveren az ember?
Nemteszteltem:[pawn]#include <a_samp>#include <dini>#define COLOR_RED 0xFF0000FFenum pTime{Seconds,Minutes,Hours,Days};new PlayerTime[MAX_PLAYERS][pTime];new PlayerTimer[MAX_PLAYERS];new UzenetTimer[MAX_PLAYERS];forward PlayedTime(playerid);forward Uzenet(playerid);public OnPlayerConnect(playerid){new file[128];PlayerTimer[playerid] = SetTimerEx(\"PlayedTime\", 1000, 1, \"%d\", playerid);UzenetTimer[playerid] = SetTimer(\"Uzenet\", 300000, true);if(!fexist(file)){ new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(file,sizeof(file),\"%s.ini\",name); if(!fexist(file)) { dini_Create(file); dini_IntSet(file, \"Seconds\", 0); dini_IntSet(file, \"Minutes\", 0); dini_IntSet(file, \"Hours\", 0); dini_IntSet(file, \"Days\", 0); }}if(fexist(file)){ new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(file,sizeof(file),\"%s.ini\",name); if(fexist(file)) { PlayerTime[playerid][seconds] = dini_Int(file, \"Seconds\"); PlayerTime[playerid][Minutes] = dini_Int(file, \"Minutes\"); PlayerTime[playerid][Hours] = dini_Int(file, \"Hours\"); PlayerTime[playerid][Days] = dini_Int(file, \"Days\"); }}return 1;}public OnPlayerDisconnect(playerid, reason){ new file[128]; new name[MAX_PLAYER_NAME]; format(file,sizeof(file),\"%s.ini\",name);if(fexist(file)){ dini_IntSet(file, \"Seconds\", PlayerTime[playerid][seconds]); dini_IntSet(file, \"Minutes\", PlayerTime[playerid][Minutes]); dini_IntSet(file, \"Hours\", PlayerTime[playerid][Hours]); dini_IntSet(file, \"Days\", PlayerTime[playerid][Days]); KillTimer(PlayerTimer[playerid]);}return 1;}public PlayedTime(playerid){if(!IsPlayerConnected(playerid)) return 0;PlayerTime[playerid][seconds]++;if(PlayerTime[playerid][seconds] == 60){ PlayerTime[playerid][Minutes]++; PlayerTime[playerid][seconds] = 0;}if(PlayerTime[playerid][Minutes] == 60){ PlayerTime[playerid][Hours]++; PlayerTime[playerid][Minutes] = 0;}if(PlayerTime[playerid][Hours] == 24){ PlayerTime[playerid][Days]++; PlayerTime[playerid][Hours] = 0;}return 1;}public Uzenet(playerid){new st[128];format(st, sizeof(st), \"Szerveren eltöltött idõ: %d Nap, %d Óra, %d Perc, %d Másodperc\", PlayerTime[playerid][Days], PlayerTime[playerid][Hours], PlayerTime[playerid][Minutes], PlayerTime[playerid][seconds]);SendClientMessage(playerid, COLOR_RED, st);}[/pawn]
ladmin ban benne van, kapard ki valahogy [/quote]Ja, csak buggol.Témát zárom!