Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. - script VotePoints -1,{
  2. OnPCLoginEvent:
  3. // Get the data to array @points, since we only get 1 value it will be treated as a variable, .@n is amount of rows
  4. set .@n, query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE `account_id` = '"+getcharid(3)+"'", @points);
  5. // If we got data
  6. if(.@n){
  7. // Update his/her values to 0
  8. query_sql("UPDATE `cp_v4p_voters` SET `points` = 0 WHERE `account_id` = '"+getcharid(3)+"'");
  9. // Update the CASHPOINTS var
  10. set #CASHPOINTS, #CASHPOINTS+@points;
  11. }
  12. close;
  13. end;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement