Mang-Berto Posted August 22, 2012 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 139 Reputation: 2 Joined: 11/15/11 Last Seen: September 20, 2013 Share Posted August 22, 2012 magandang araw po, papaano po ba palitan yung points na nakukuha sa v4p ni sir jaypee from points to cashpoints in game? maraming salamat po! Quote Link to comment Share on other sites More sharing options...
Euro Posted August 22, 2012 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 26 Reputation: 10 Joined: 01/01/12 Last Seen: October 12, 2023 Share Posted August 22, 2012 (edited) I haven't tested this code but here's it: *Edit* Fixed Typo prontera,x,y,n script V4P to Cash n,{ function updatePoints; function getPoints; set .@points, getPoints(getcharid(3)); mes "You have"+.@points; mes "Would you like to exchange them all?"; switch ( select ("Yes","No") ) { case 1: updatePoints(getcharid(3), .@points); break; case 2: break; } close; function updatePoints { set .@account_id,getarg(0); set .@usedPoints,getarg(1); query_sql("UPDATE `cp_v4p_voters` SET points=(points-"+.@usedPoints+") WHERE account_id='"+.@account_id+"'"); return; } function getPoints { set .@account_id,getarg(0); query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE account_id="+.@account_id+" LIMIT 1",.@points); if(getarraysize(.@points)==0) return 0; return .@points[0]; } } Edited August 22, 2012 by Euro Quote Link to comment Share on other sites More sharing options...
Mang-Berto Posted August 23, 2012 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 139 Reputation: 2 Joined: 11/15/11 Last Seen: September 20, 2013 Author Share Posted August 23, 2012 (edited) It's not working! Edited August 23, 2012 by Mang-Berto Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.