0 Members and 2 Guests are viewing this topic.
function GetTickCount(): cardinal;
@tyxstand:Code: [Select]function GetTickCount(): cardinal;It is the same "tick unit" used by AppOnIdle. Return type is cardinal, or integer; not certain, but if I recall correctly I saw it first posted with type cardinal, which does not match AppOnIdle :/ not sure why but whatever, they are still interchangeable usually.
Quote from: DorkeyDear on July 17, 2010, 08:29:59 pm@tyxstand:Code: [Select]function GetTickCount(): cardinal;It is the same "tick unit" used by AppOnIdle. Return type is cardinal, or integer; not certain, but if I recall correctly I saw it first posted with type cardinal, which does not match AppOnIdle :/ not sure why but whatever, they are still interchangeable usually.uhhhm, GetTickCount is a real function? i've never heard of that anywhere. or are you suggesting that it should be implemented?
Procedure OnPlayerCommand()if Text = '/char' then begin WriteConsole(ID,'Your stats',$EE81FAA1); WriteConsole(ID,'Total Kills: '+inttostr(trKills[ID])+'!',$EE81FAA1); WriteConsole(ID,'Rank: '+ReadINI('Players/'+GetPlayerStat(ID,'Name')+'.ini','stats','rank','*ERROR while loading rank*')+'!',$EE81FAA1); WriteConsole(ID,'Class: '+ReadINI('Players/'+GetPlayerStat(ID,'Name')+'.ini','stats','class','*ERROR while loading kills*')+'!',$EE81FAA1); WriteConsole(ID,'Total number of Predators used: '+ReadINI('Players/'+GetPlayerStat(i,'Name')+'.ini','stats','tupred','*ERROR while loading pred num*')+'!',$EE81FAA1); WriteConsole(ID,'Total number of Achievements: '+ReadINI('Players/'+GetPlayerStat(i,'Name')+'.ini','stats','kills','*ERROR while loading achievements*')+'!',$EE81FAA1); end;end;
[stats]IP=reg=1kills=0rank=1class=1tupred=0tna=1[achievements]TP=1
GetPlayerStat(i,'Name')
Function OnPlayerCommand(ID:Byte; Text:String):Boolean;begin Result := false // set to true to disallow commandsend;
lol oops, u get the point tho, thanks darkFrom: July 18, 2010, 11:53:10 pmomg how the feck do i debug this?for some reason lines are disappearing from the ini file, and some are being changed randomlybut there is nothing used in the code to remove keys from the ini file, only think that is is the code for the iniremovekey or whatever they were, but those functions arent being used, as for the randomly changing keys...., maybe theres somehing else thats causing this, but i got a headache and cant think at the moment, this is aggrivatingFrom: July 18, 2010, 11:57:05 pmseems to be caused on lag spike
procedure apponidleif Timer = 0 then begin//Writeconsole(0,'saving all accounts',$0000FFFF);//Command('/save');for i:= 1 to 32 do if Getplayerstat(i,'Ping') > 0 then begininiWrite('Players/'+GetPlayerStat(i,'Name')+'.ini','stats','kills',inttostr(trKills[i]));iniWrite('Players/'+GetPlayerStat(i,'Name')+'.ini','stats','tupred',inttostr(TUPred[i]));iniWrite('Players/'+GetPlayerStat(i,'Name')+'.ini','stats','barkills',inttostr(barKills[i]));inisave('Players/'+GetPlayerStat(i,'Name')+'.ini',iniLoad('Players/'+GetPlayerStat(ID,'Name')+'.ini'));end;iniWrite('scripts/Shop/profit.ini','profit','cash',inttostr(Cash));//Sleep(2000);//Timer:=300;end;end;
08: iniWrite('Players/'+GetPlayerStat(i,'Name')+'.ini','stats','barkills',inttostr(barKills[i]));09: inisave('Players/'+GetPlayerStat(i,'Name')+'.ini',iniLoad('Players/'+GetPlayerStat(ID,'Name')+'.ini'));