Jump to content

Cardinia

Resident
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is this compiled together already as I do not know how to script. Also by reading it I did not notice it would tell the person voting that they must wait 24 hours to vote again if they tried voting twice. Could someone please put that all together so I may copy n paste it into sl. Thank you all for your help and suggestions!.
  2. Can anyone help me change this so an avatar may vote once per day please?. And say they must wait 24 hours to vote again if they try clicking the prim again?. string g_THANKS_MSG = "Thanks for voting"; // this will be in the hover text over the prim string g_HOVER_TEXT = "Click here & Vote for me!"; // -- dont need to edit anything below here probably unless you want to change // how the message is delivered when someone votes. see: touch_start -- integer g_VOTES = 0; // list of avis that voted list g_VOTERS; // ------------------------------------------------------------------------ update() { llSetText( g_HOVER_TEXT + "\n" + (string)g_VOTES + " votes", <1,1,1>, 1.0 ); } // ------------------------------------------------------------------------ integer addVote( key id ) { // check memory and purge the list if we are getting full if( llGetFreeMemory() < 1000 ) { g_VOTERS = []; } // make sure they have not voted already if( llListFindList( g_VOTERS, [id] ) == -1 ) { g_VOTES++; g_VOTERS = (g_VOTERS=[]) + g_VOTERS + [id]; update(); return TRUE; } return FALSE; } // ------------------------------------------------------------------------- default { // -------------------------------------------------------------------- state_entry() { update(); } // -------------------------------------------------------------------- touch_start(integer total_number) { integer i; for( i = 0; i < total_number; i++ ) { if( addVote( llDetectedKey(i))) { if( g_THANKS_MSG != "" ) { // uncomment one and only one of these next 3 lines //llWhisper( 0, g_THANKS_MESSAGE ); //llSay( 0, g_THANKS_MSG ); llInstantMessage( llDetectedKey(i), g_THANKS_MSG ); } } } } }
×
×
  • Create New...