CPS for voteing.?

04/09/2010 22:41 allizzel777#1
how do i make something like on my site that when people vote itl give there char CPS?
can someone help me with this?
04/10/2010 00:08 zTREME#2
php
04/10/2010 00:38 pro4never#3
Quote:
Originally Posted by zTREME View Post
php
He could mean voting from ingame...

What I do is have a window pop up when characters log in asking if they want to vote. If they do, it sets their vote time in the database (so it won't ask again for 12 hours), awards the cp and opens the voting window.

If ingame just add cps and open the site from ingame (links can be opened with a chat packet, exact examples have been posted already) and possibly add a check to see if they've already voted.

If you are using a website then do something almost identical but instead you will want a popup asking if they want to vote and for their ingame name (checked for when the last time they have voted, I suggest googling code examples for that) and then if they do vote, run a mysql query to add cps to their character name/account (or however you want to handle that)
04/10/2010 00:48 zTREME#4
Quote:
Originally Posted by pro4never View Post
He could mean voting from ingame...

What I do is have a window pop up when characters log in asking if they want to vote. If they do, it sets their vote time in the database (so it won't ask again for 12 hours), awards the cp and opens the voting window.

If ingame just add cps and open the site from ingame (links can be opened with a chat packet, exact examples have been posted already) and possibly add a check to see if they've already voted.

If you are using a website then do something almost identical but instead you will want a popup asking if they want to vote and for their ingame name (checked for when the last time they have voted, I suggest googling code examples for that) and then if they do vote, run a mysql query to add cps to their character name/account (or however you want to handle that)
your right, just thought he ment like Last Co and those.
And i have no clue in php, so i couldnt tell him how :)
04/10/2010 17:56 superplox#5
Quote:
Originally Posted by pro4never View Post
He could mean voting from ingame...

What I do is have a window pop up when characters log in asking if they want to vote. If they do, it sets their vote time in the database (so it won't ask again for 12 hours), awards the cp and opens the voting window.

If ingame just add cps and open the site from ingame (links can be opened with a chat packet, exact examples have been posted already) and possibly add a check to see if they've already voted.

If you are using a website then do something almost identical but instead you will want a popup asking if they want to vote and for their ingame name (checked for when the last time they have voted, I suggest googling code examples for that) and then if they do vote, run a mysql query to add cps to their character name/account (or however you want to handle that)
or maybe u could add a npc that gives u the option to vote u click it, it rewards u with cps and takes u to the voting site? if thats what u were saying then my bad
04/10/2010 19:13 pro4never#6
Quote:
Originally Posted by superplox View Post
or maybe u could add a npc that gives u the option to vote u click it, it rewards u with cps and takes u to the voting site? if thats what u were saying then my bad
Personally I just have it sent to the player when they login (if they haven't already voted) without having to use an npc... if not alot of people will never find the npc to use it.