Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Register your account to receive email notifications when new services and mods are added.


This forum is now closed and has moved to a new location! Click here to find out why.
Pages: 1 2 3 [4] 5 6

AuthorTopic: [MCCode] Voting System  (Read 10077 times)

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: [MCCode] Voting System
« Reply #45 on: July 13, 2009, 11:05:40 PM »
ok..thanks sorry for being a pain...+1
No problem, just dont like people accusing the mod of not working =. =P
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.

kenja

  • Basic Member
  • *
  • Reputation Power: 0
  • kenja has no influence.
  • Offline Offline
  • Posts: 5
    • View Profile
Re: [MCCode] Voting System
« Reply #46 on: July 14, 2009, 01:31:04 AM »
lol..i'm a noob
Logged

weewooz1

  • Basic Member
  • *
  • Reputation Power: 1
  • weewooz1 has no influence.
  • Offline Offline
  • Posts: 3
    • View Profile
Re: [MCCode] Voting System
« Reply #47 on: July 14, 2009, 05:11:24 AM »
works for 1 day on my game next day lets ya vote as many times as ya want again
Logged

kenja

  • Basic Member
  • *
  • Reputation Power: 0
  • kenja has no influence.
  • Offline Offline
  • Posts: 5
    • View Profile
Re: [MCCode] Voting System
« Reply #48 on: July 14, 2009, 09:02:43 AM »
Obviously your still running the voting cron, which you aren't supposed to do.
So every day when it resets your votes, it deletes the timestamp, which is why it messes up after 1 day.

here is how i fixed mine
Logged

weewooz1

  • Basic Member
  • *
  • Reputation Power: 1
  • weewooz1 has no influence.
  • Offline Offline
  • Posts: 3
    • View Profile
Re: [MCCode] Voting System
« Reply #49 on: July 15, 2009, 01:50:20 PM »
voting vron i cant see it in day cron
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: [MCCode] Voting System
« Reply #50 on: August 09, 2009, 03:03:16 PM »
works for 1 day on my game next day lets ya vote as many times as ya want again
Are you ok can you read if you can go back up two or three posts and see where it says you dont need anything to do with voting in the day cron ;) cronus nice mod seen it on other sites for moneyz thats not  8)  ;) but ill download it now and feed back will come
Logged
Project Choosen - 10%
Daniel - Hanson . Com

uwibami

  • Basic Member
  • *
  • Reputation Power: 33
  • uwibami has no influence.
  • Offline Offline
  • Posts: 7
    • View Profile
Re: [MCCode] Voting System
« Reply #51 on: August 16, 2009, 01:32:23 PM »
My version of this mod only allows one vote then when you go to another page then come back you are able to vote again, I have no cron set just what the mod came with,
Any ideas.
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: [MCCode] Voting System
« Reply #52 on: August 16, 2009, 03:59:16 PM »
My version of this mod only allows one vote then when you go to another page then come back you are able to vote again, I have no cron set just what the mod came with,
Any ideas.
in the table votingsites do you have the user id 0
Logged
Project Choosen - 10%
Daniel - Hanson . Com

uwibami

  • Basic Member
  • *
  • Reputation Power: 33
  • uwibami has no influence.
  • Offline Offline
  • Posts: 7
    • View Profile
Re: [MCCode] Voting System
« Reply #53 on: August 16, 2009, 05:02:45 PM »
user id 0 ???

not sure exactly what you mean by that lol the field 'id' under votingsites i see nothing with a zero.
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: [MCCode] Voting System
« Reply #54 on: August 17, 2009, 05:57:11 PM »
try re-running this query INSERT INTO `votes` (`userid`, `site`) VALUES (0, 1237179600);
Logged
Project Choosen - 10%
Daniel - Hanson . Com

uwibami

  • Basic Member
  • *
  • Reputation Power: 33
  • uwibami has no influence.
  • Offline Offline
  • Posts: 7
    • View Profile
Re: [MCCode] Voting System
« Reply #55 on: August 18, 2009, 09:04:58 AM »
Thank you danny696, That query wasnt even on there :) it worked perfectly.now it says done when finished voting
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: [MCCode] Voting System
« Reply #56 on: August 19, 2009, 06:06:57 AM »
thats what re-sets the voting p.s make sure you remove the tuction voting in cron day
Logged
Project Choosen - 10%
Daniel - Hanson . Com

strats

  • Active Member
  • **
  • Reputation Power: 13
  • strats has no influence.
  • Offline Offline
  • Posts: 109
    • View Profile
Re: [MCCode] Voting System
« Reply #57 on: September 07, 2009, 01:21:58 PM »
Heres an addon for staff to see who has voted...

Add This to the bottom of Staff_Logs
Code: [Select]
function view_vote_logs()
{
global $ir,$c,$h,$userid;
print "<h3>Voting Logs</h3>
<table width=75% border=1> <tr> <th>ID</th> <th>Time</th><th>Player</th></tr>";
$q=mysql_query("SELECT * FROM votes ORDER BY  userid ASC",$c);
while($r=mysql_fetch_array($q))
{
print"<tr><td>{$r['site']}</td> <td>".date('F j, Y, g:i:s a',$r['voteTIME'])."</td><td><a href='viewuser.php?u={$r['userid']}'>{$r['userid']}</a></td>
</tr>";
}
}

Add the case

Code: [Select]
case 'votelogs': view_vote_logs(); break;
In the File - Voted.php

Code: [Select]
if($r['rewardtype'] == 1)
 {
 $muneh=money_formatter($reward);
 mysql_query("INSERT INTO votes values ($userid,$id,unix_timestamp())",$c);
 event_add($userid,"Thank you for voting! You have receieved $muneh!", $c);
 mysql_query("UPDATE users SET money=money+$reward WHERE userid=$userid",$c);
 }
 if($r['rewardtype'] == 2)
 {
 mysql_query("INSERT INTO votes values ($userid,$id,unix_timestamp())",$c);

^^ Lines 70-79

And for the link

<a href='staff_logs.php?action=votelogs'>Voting Logs</a><br />


Remove if not needed here.


I like this idea.
I have put it all in as showed but when I click on the voting logs it just says
Error: This script requires an action.


Help anyone?
Logged

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Re: [MCCode] Voting System
« Reply #58 on: September 07, 2009, 02:32:01 PM »
You didnt use an action
Logged
Project Choosen - 10%
Daniel - Hanson . Com

strats

  • Active Member
  • **
  • Reputation Power: 13
  • strats has no influence.
  • Offline Offline
  • Posts: 109
    • View Profile
Re: [MCCode] Voting System
« Reply #59 on: September 07, 2009, 04:08:07 PM »
You didnt use an action

No offence but that's not a helpful or clever remark
Logged
Pages: 1 2 3 [4] 5 6
« previous next »
 


This forum is now closed and has moved to a new location! Click here to find out why.