HELP?

 
Post new topic   Reply to topic    Freakz Forum Index -> Freakz.ro -> FREAKZ.ro subdomains requests -> Freakz Collaborations
Author Message
iulian9817

[Mentally Stable]



Status: Offline
(since 24-01-2017 21:35)
Joined: 11 Jan 2017
Posts: 8, Topics: 5
Location: Romania

Reputation: 2.4

Post Posted: 11-01-2017, 15:41:27 | Translate post to: ... (Click for more languages)

Salut!
Am gasit pe net acest plugin:
/* Plugin generated by AMXX-Studio */
/* TimePlayed with levels v1.0*/

#include <amxmodx>
#include <amxmisc>
#include <fvault>
#include <colorchat>

#define PLUGIN "Time"
#define VERSION "1.1"
#define AUTHOR "StarMazter"

#define MAXPLAYERS 32
#define MAX_BUFFER_LENGTH 2047

new szVault[] = "Time";

new iTotalLevels = 5;

new szLevels[][64] = {
"Level 1, Noob, 1 Day (24 hours) Playtime.",
"Level 2, Getting started, 3 Days (72 hours) Playtime.",
"Level 3, Going up, 1 week (168 hours) Playtime.",
"Level 4, Hero, 1 weeks and 3 days (240 hours) Playtime.",
"Level 5, Legend, 2 weeks and 4 days (432 hours) playtime."
};

new szTimes[][64] = {
"24",
"72",
"168",
"240",
"432"
};

new Trie:SaveTime;
new Trie:Rank;
new Trie:Name;

new TotalRanks;

new iCurrentTime[MAXPLAYERS+1];

new sBuffer[MAX_BUFFER_LENGTH + 1]

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);

register_clcmd("say /time", "CmdTimeTop"); // Register Commands.
register_clcmd("say /mytime", "CmdTime");
register_clcmd("say /levels", "CmdLevels");
}

public plugin_cfg()
{
SaveTime = TrieCreate();
Rank = TrieCreate()
Name = TrieCreate()
LoadData();
}

public plugin_end()
{
TrieDestroy(SaveTime); // Delete Trie to prevent bugs
TrieDestroy(Rank);
}

LoadData()
{
new iTotal = fvault_size(szVault);

new szSteamId[32], szName[32], szTime[32], szData[64], szKey[32];
for( new i = 0; i < iTotal; i++ )
{
fvault_get_keyname(szVault, i, szSteamId, sizeof(szSteamId) - 1); // Return Saved Values.
fvault_get_data(szVault, szSteamId, szData, sizeof(szData) - 1);

parse(szData, szName, sizeof(szName) - 1, szTime, sizeof(szTime) - 1)

TrieSetCell(SaveTime, szSteamId, str_to_num(szTime)) // Set the players new time to the Cell.

num_to_str(TotalRanks, szKey, sizeof(szKey) - 1)

TrieSetString(Name, szKey, szName)
TrieSetCell(Rank, szKey, str_to_num(szTime))
TotalRanks++
}
}

SaveData(id)
{
new szSteamId[32], szName[32], szTime[32], szData[64];
get_user_authid(id, szSteamId, 31) // Retrieve Steamid.
get_user_name(id, szName, 31)

TrieSetCell(SaveTime, szSteamId, iCurrentTime[id]) // Set the players new time to the Cell.

num_to_str(iCurrentTime[id], szTime, sizeof(szTime) - 1) // Set the num to a string
formatex(szData, sizeof(szData) - 1, "^"%s^" %s", szName, szTime)

fvault_set_data(szVault, szSteamId, szData) // Set data to the vault.
}

public client_authorized(id)
{
new szSteamId[32];
get_user_authid(id, szSteamId, sizeof(szSteamId) - 1) // Retrieve Steamid.

TrieGetCell(SaveTime, szSteamId, iCurrentTime[id]); // Load user's old time.
}

public client_disconnect(id)
{
new iAddTime = get_user_time(id); // Getting the user's hes current time.

iCurrentTime[id] += iAddTime; // Adding hes new time to hes old time.

SaveData(id)
}

public CmdTimeTop(id)
{
new iRanks[10], iRanking[10], szKey[5], iTemp, z

for(new x; x < 10; x++)
{
for(new i=0; i <= TotalRanks; i++)
{
num_to_str(i, szKey, sizeof(szKey) - 1)
TrieGetCell(Rank, szKey, iTemp)

if(x == 0)
{
if(iRanks[x] < iTemp)
{
iRanks[x] = iTemp
iRanking[x] = i

if(z<x)
z=x
}
}
else
{
if(iRanks[x] < iTemp && iRanks[x-1] > iTemp)
{
iRanks[x] = iTemp
iRanking[x] = i

if(z<x)
z=x
}
}
}
}

new szName[32]
new iLen

iLen = format(sBuffer, MAX_BUFFER_LENGTH, "<body bgcolor=#000000><font color=#FFB000><pre>")
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "#%s %s %s^n", "Rank", "Nick", "PlayedTime")

for(new y; y <= z; y++)
{
num_to_str(iRanking[y], szKey, sizeof(szKey) - 1)
TrieGetCell(Rank, szKey, iTemp)
TrieGetString(Name, szKey, szName, sizeof(szName) - 1)

iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "#%i %s %i ^n", y + 1, szName, iTemp)
}

show_motd(id, sBuffer, "Top 10 PlayedTime")
}



public CmdTime(id)
{
new iSecTempTime, iLevel, iRank, iTime, szKey[5];

iSecTempTime = (iCurrentTime[id] + get_user_time(id)) // Get user's current time

for(new i; i < iTotalLevels; i++)
{
if((iSecTempTime/3600) >= str_to_num(szTimes[i])) // Compare with presseted levels.
{
iLevel++ // Add a level
}
}

iRank=1

for(new i; i < TotalRanks + 1; i++)
{
num_to_str(i, szKey, sizeof(szKey) - 1)
TrieGetCell(Rank, szKey, iTime)

if(iCurrentTime[id] < iTime)
{
iRank++
}
}

ColorChat(id,RED,"^x01[^x04Time^x01]^x01 Your playing time is^x03 %i ^x01Houres, Rank :^x03 %i/%i ^x01[^x04%i Seconds^x01].", iSecTempTime/3600, iRank, TotalRanks, iSecTempTime);
ColorChat(id,RED,"^x01[^x04Time^x01]^x01 %s", szLevels[iLevel])
}

public CmdLevels(id)
{
ColorChat(id,RED,"^x01[^x04Time^x01]^x01 Please look into ur console.");

for(new i; i < iTotalLevels; i++)
{
console_print(id, "%s", szLevels[i]) // Print all levels in user's console
}
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1053\\ f0\\ fs16 \n\\ par }
*/


Ei bine acest plugin din cate am inteles este pentru lv pe ore...la 24 ore pe sv lv 1 si tot asa...eu doresc ca cineva sa mi-l modifice...si anume sa fie cca. 10 lv ... si sa spun eu timpul si tot ce trebuie ... mai pe scurt daca cineva stie sa modifice acest plugin dupa cum doresc eu ii dau fondator pe sv + acces fps ... daca nu platesc $$$ ... nu-i problema momentan nu am sv ... dar deindata ce gasesc pe cineva care ma poate ajuta cu acest lucru ... am hostat eu Singur sv-ul la BTS ... help plz!

0 0
  
Back to top
View user's profile Send private message
LaurRsk

[Account disabled]



Status: Offline
(since 14-01-2017 01:41)
Joined: 15 Mar 2016
Posts: 21, Topics: 4
Location: Constanta

Reputation: 1.8

Post Posted: 11-01-2017, 18:36:05 | Translate post to: ... (Click for more languages)

Lasa mi skype ul tau prin pm si te rezolva varu'.
Edit: lasa mi pm pe @IceCubes


@IceCubes Contul meu activ. Pe acesta il voi dezactiva. Multumesc.
0 0
  
Back to top
View user's profile Send private message
Freakz*DuLceTeL

[S3X*p3rMaN3nTy; x ]



Status: Offline
(online 1 hour ago)
Joined: 27 Jun 2015
Posts: 13077, Topics: 1465
Location: |~in borcanu cu dulceatã :x~|

Reputation: 12.2
Votes: 602

     
Post Posted: 11-01-2017, 19:40:19 | Translate post to: ... (Click for more languages)

Ai gresit sectiunea,aici trebuia: Click aici.


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
iulian9817

[Mentally Stable]



Status: Offline
(since 24-01-2017 21:35)
Joined: 11 Jan 2017
Posts: 8, Topics: 5
Location: Romania

Reputation: 2.4

Post Posted: 12-01-2017, 17:55:48 | Translate post to: ... (Click for more languages)

Nu mai am nevoie !!!
Doresc un partener care sa stie sa instaleze un addons si cam atat - primeste fondator..in aceasta dimineata am hostat sv-ul la BTS am in cont destui bani...si vreau sa-l facem calumea...cu un addons de furien pe credite...si sa dam drumul la sv - Daca este cineva interesat pm!

0 0
  
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Freakz Forum Index -> Freakz.ro -> FREAKZ.ro subdomains requests -> Freakz Collaborations  


The time now is 24-04-2017, 00:34:23
Copyright info

Based on phpBB ro/com

 
 
 





I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x