iCORE 33 Posted August 15, 2015 hi i would like to request a script for online players on map that refresh every 3 seconds Prontera,154,108,0 script Sample 757,{OnPCLoginEvent:OnPCLogoutEvent:delwaitingroom;end;OnInit:waitingroom ""+getusers(1)+" players in Prontera",0;end;} tell me whats wrong PS the script is not refreshing and it needs to be click to see the players online count Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted August 15, 2015 This script is soooo off.use getmapusers, and why are you using login and logout events? Quote Share this post Link to post Share on other sites
0 iCORE 33 Posted August 15, 2015 hmm can you help me? how to refresh it like 3 sec because every time a player is on the map the number will not change solved prontera,154,108,0 script Online Players 2_BULLETIN_BOARD,{end;OnInit:while( 1 ){ delwaitingroom; waitingroom ""+getusers(1)+" players in prontera",0; sleep 1;}end;} Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted August 15, 2015 Woah, sleep 1, for just 1 millisecond? You'll use up a lot of your processing time just for that. I guess it'd be good enough if you wait a second (1000 ticks) for that. That'll make your script a literal thousand times more resource-efficient, while not damaging performance that much since players don't care for that delay. If you want to make the delay invisible to human eye (seeming almost instantly), just change it to 100 (or 50 if you've got people with lightning-fast eye reaction time). Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted August 15, 2015 hmm can you help me? how to refresh it like 3 sec because every time a player is on the map the number will not change solved prontera,154,108,0 script Online Players 2_BULLETIN_BOARD,{end;OnInit:while( 1 ){ delwaitingroom; waitingroom ""+getusers(1)+" players in prontera",0; sleep 1;}end;} getusers with the parameter 1 counts all players on the server, not just on one map. If you really just want those on prontera you need to use parameter 8. *getusers(<type>)This function will return a number of users on a map or the whole server. What it returns is specified by Type.Type can be one of the following values, which control what is returned:0 - Count of all characters on the map of the invoking character.1 - Count of all characters in the entire server.8 - Count of all characters on the map of the NPC the script is running in. prontera,154,108,0 script Online Players 2_BULLETIN_BOARD,{ end; OnInit: while( sleep( 1000 ) ) { delwaitingroom; waitingroom getusers( 8 ) + " players in Prontera", 0; } end;} Quote Share this post Link to post Share on other sites
0 Emistry 145 Posted August 16, 2015 - script map_player_count -1,{ end; OnTimer3000: delwaitingroom; waitingroom getusers( 8 ) + " players in "+strnpcinfo(4), 0; OnInit: if ( strnpcinfo(4) != "" ) initnpctimer; end;}prontera,155,181,4 duplicate(map_player_count) Prontera Count 2_BULLETIN_BOARDmorocc,155,181,4 duplicate(map_player_count) Morocc Count 2_BULLETIN_BOARDpayon,155,181,4 duplicate(map_player_count) Payon Count 2_BULLETIN_BOARDalberta,155,181,4 duplicate(map_player_count) Alberta Count 2_BULLETIN_BOARD Quote Share this post Link to post Share on other sites
hi i would like to request a script for online players on map that refresh every 3 seconds
tell me whats wrong
PS the script is not refreshing and it needs to be click to see the players online count
Share this post
Link to post
Share on other sites