how do i make something like on my site that when people vote itl give there char CPS?
can someone help me with this?
can someone help me with this?
He could mean voting from ingame...Quote:
php
your right, just thought he ment like Last Co and those.Quote:
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 badQuote:
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)
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.Quote:
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