MuhammadZeeshan

asfgasgas gag

Dec 5th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. QuerySQL(db, "CREATE TABLE IF NOT EXISTS VIP(Name TEXT, Time NUMERIC DEFAULT 0, TimeExp NUMERIC DEFAULT 0 ) );
  2.  
  3.  
  4.  
  5.  
  6.  
  7. function VIP( player, duration )
  8. {
  9. local g_time, duration_type;
  10. switch( duration.len() )
  11. {
  12. case 2: //this is for slicing the type of 1d
  13. g_time = duration.slice(0,1);
  14. duration_type = duration.slice(1,2);
  15. break;
  16. }
  17. local g_time_, g_duration_type_;
  18. switch( duration_type )
  19. {
  20. case "d":
  21. g_time_ = g_timeexp.tointeger() * 86400;
  22. g_duration_type_ = "day(s)";
  23. break;
  24.  
  25. default:
  26. SendMessage( "Invalid format, the format you typed is wrong", player );
  27. }
  28. local dur = g_time + " " + g_duration_type_;
  29. SendMessage( "[VIP] - You have purchased the vip pack for " + dur + ".", player );
  30. QuerySQL(db, "INSERT INTO VIP ( Name, Time, TimeExp ) VALUES ( '"+player.Name+"', '"+time()+"', '"+g_timeexp_+"'" );
  31. }
Add Comment
Please, Sign In to add comment