Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script VotePoints -1,{
- OnPCLoginEvent:
- // Get the data to array @points, since we only get 1 value it will be treated as a variable, .@n is amount of rows
- set .@n, query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE `account_id` = '"+getcharid(3)+"'", @points);
- // If we got data
- if(.@n){
- // Update his/her values to 0
- query_sql("UPDATE `cp_v4p_voters` SET `points` = 0 WHERE `account_id` = '"+getcharid(3)+"'");
- // Update the CASHPOINTS var
- set #CASHPOINTS, #CASHPOINTS+@points;
- }
- close;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement