daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include    <  a_samp >
  2. #include    <  ZCMD   >
  3. #include    < sscanf2  >
  4. #include    <YSI/y_ini>
  5.  
  6.  
  7.  
  8. #define COL_RED         "{F81414}"
  9. #define COL_LIGHTBLUE   "{00C0FF}"
  10. #define COL_LRED        "{FFA1A1}"
  11. #define COL_GREEN       "{6EF83C}"
  12. #define COL_GREY        "{C3C3C3}"
  13. #define COLOR_WHITE     0xFFFFFFAA
  14.  
  15.  
  16.  
  17. #define DIALOG_REG      1995
  18. #define DIALOG_REG_REQ  1996
  19. #define DIALOG_LOGIN    1997
  20. #define DIALOG_LOGIN2   1998
  21. #define DIALOG_LOG_DONE 1999
  22. #define DIALOG_LOG      2000
  23. #define DIALOG_STATS    2001
  24. #define INFO_BOX        2002
  25.  
  26.  
  27.  
  28. #define Level0 "Member"
  29. #define Level1 "Junior Moderator"
  30. #define Level2 "Administrator"
  31. #define Level3 "Head Admin"
  32. #define Level4 "Owner"
  33. #define VIP_YES "Yes"
  34. #define VIP_NO "No"
  35.  
  36. //Time
  37.  
  38. new Text:Servt;                                   //Server Time Text draw Variable
  39. new Tsec;                                         //stores the mins  of time
  40. new THrs;                                         //stores hours of time
  41.  
  42. //Afk System//
  43. new PlayerAFK[MAX_PLAYERS];
  44.  
  45. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  46. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  47. new God[ MAX_PLAYERS ], CGod[ MAX_PLAYERS ];
  48. public OnFilterScriptInit( )    return 1;
  49. public OnFilterScriptExit( )    return 1;
  50.  
  51.  
  52. forward ParsePlayerPass( playerid, name[ ], value[ ] );
  53. public ParsePlayerPass( playerid, name[ ], value[ ] )
  54. {
  55.     if ( !strcmp( name, "PASSWORD" ) )
  56.     {
  57.         SetPVarString( playerid, "pPass", value );
  58.     }
  59. }
  60.  
  61. forward LoadUser( playerid, name[ ], value[ ] );
  62. public LoadUser( playerid, name[ ], value[ ] )
  63. {
  64.     if ( !strcmp(name, "REG_DATE"   ) )     SetPVarString( playerid, "Date",    value           );
  65.     if ( !strcmp(name, "MONEYS"     ) )     SetPVarInt( playerid, "Moneys",     strval( value ) );
  66.     if ( !strcmp(name, "SCORE"      ) )     SetPVarInt( playerid, "Score",      strval( value ) );
  67.     if ( !strcmp(name, "LEVEL"      ) )     SetPVarInt( playerid, "Level",      strval( value ) );
  68.     if ( !strcmp(name, "VIP_LEVEL"  ) )     SetPVarInt( playerid, "VIP Level",  strval( value ) );
  69.     if ( !strcmp(name, "MY_WEATHER" ) )     SetPVarInt( playerid, "Weather",    strval( value ) );
  70.     if ( !strcmp(name, "MY_TIME"    ) )     SetPVarInt( playerid, "Time",       strval( value ) );
  71.     if ( !strcmp(name, "MY_SKIN"    ) )     SetPVarInt( playerid, "Skin",       strval( value ) );
  72.     if ( !strcmp(name, "LAST_ON"    ) )     SetPVarString( playerid, "On",      value           );
  73.     if ( !strcmp(name, "KILLS"      ) )     SetPVarInt( playerid, "Kills",      strval( value ) );
  74.     if ( !strcmp(name, "DEATHS"     ) )     SetPVarInt( playerid, "Deaths",     strval( value ) );
  75.     if ( !strcmp(name, "MUTED"      ) )     SetPVarInt( playerid, "Muted",      strval( value ) );
  76.     if ( !strcmp(name, "GOD"        ) )     SetPVarInt( playerid, "God",        strval( value ) );
  77.     if ( !strcmp(name, "CAR_GOD"    ) )     SetPVarInt( playerid, "CGod",       strval( value ) );
  78. }
  79.  
  80. CMD:register( playerid, params[ ] )
  81. {
  82.     #pragma unused params
  83.     if ( GetPVarInt( playerid, "Logged" ) == 1 )
  84.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} You are already registered and logged in.");
  85.  
  86.     ShowPlayerDialog( playerid, DIALOG_REG, DIALOG_STYLE_INPUT, "{FFFFFF}Registering...", "{FFFFFF}Please write your desired password.", ">>>", "Exit");
  87.     return 1;
  88. }
  89. CMD:login( playerid, params[ ] )
  90. {
  91.     #pragma unused params
  92.     if ( GetPVarInt( playerid, "Logged" ) == 1 )
  93.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} You are already registered and logged in.");
  94.  
  95.     ShowPlayerDialog( playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, "{FFFFFF}Login", "{FFFFFF}Please write your current password", "Login", "Kick");
  96.     return 1;
  97. }
  98. CMD:ban( playerid, params[ ] )
  99. {
  100.     if ( GetPVarInt( playerid, "Level" ) < 2 )
  101.         return SendClientMessage( playerid, -1, "You must be an "COL_LIGHTBLUE""Level2"{FFFFFF} to ban someone.");
  102.  
  103.     if ( sscanf( params, "uS", params[ 0 ], params[ 1 ] ) )
  104.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /kick <id> [reason]");
  105.  
  106.     if ( !IsPlayerConnected( params[ 0 ] ) )
  107.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  108.  
  109.  
  110.     new String[ 256 ];
  111.  
  112.     format( String, sizeof String, ""COL_LIGHTBLUE"%s"COL_GREY"( %s | ID: %i){FFFFFF} banned player "COL_LIGHTBLUE"%s"COL_GREY"( %s | ID: %i ) "COL_LIGHTBLUE"Reason: "COL_GREY"%s",
  113.                 pName( playerid ),
  114.                 GetPlayerLevelName( playerid ),
  115.                 playerid,
  116.                 pName( params[ 0 ] ),
  117.                 GetPlayerLevelName( params[ 0 ] ),
  118.                 params[ 0 ],
  119.                 params[ 1 ]);
  120.  
  121.     SendClientMessageToAll( -1, String );
  122.     Ban( params[ 0 ] );
  123.     return 1;
  124. }
  125. CMD:kick( playerid, params[ ] )
  126. {
  127.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  128.         return SendClientMessage( playerid, -1, "You must be an admin level "COL_LIGHTBLUE"1{FFFFFF} or above.");
  129.  
  130.     if ( sscanf( params, "uS", params[ 0 ], params[ 1 ] ) )
  131.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /kick <id> [reason]");
  132.  
  133.     if ( !IsPlayerConnected( params[ 0 ] ) )
  134.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  135.  
  136.  
  137.     new String[ 256 ];
  138.  
  139.     format( String, sizeof String, ""COL_LIGHTBLUE"%s"COL_GREY"( %s | ID: %i){FFFFFF} kicked player "COL_LIGHTBLUE"%s"COL_GREY"( %s | ID: %i ) "COL_LIGHTBLUE"Reason: "COL_GREY"%s",
  140.                 pName( playerid ),
  141.                 GetPlayerLevelName( playerid ),
  142.                 playerid,
  143.                 pName( params[ 0 ] ),
  144.                 GetPlayerLevelName( params[ 0 ] ),
  145.                 params[ 0 ],
  146.                 params[ 1 ]);
  147.  
  148.     SendClientMessageToAll( -1, String );
  149.     Kick( params[ 0 ] );
  150.     return 1;
  151. }
  152. CMD:goto(playerid, params[])
  153. {
  154.     new ID;
  155.     if(sscanf(params, "u", ID))
  156.         return SendClientMessage(playerid, 0xF97804FF, "USAGE: /goto [id]");
  157.  
  158.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  159.         return SendClientMessage( playerid, -1, "You must be an admin level "COL_LIGHTBLUE"1{FFFFFF} or above.");
  160.    
  161.     else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, 0xF97804FF, "Player is not connected!");
  162.     else
  163.     {
  164.     new Float:x, Float:y, Float:z;
  165.     GetPlayerPos(ID, x, y, z);
  166.     SetPlayerPos(playerid, x+1, y+1, z);
  167.     }
  168.     return 1;
  169. }
  170. CMD:cgoto(playerid,params[])
  171. {
  172.     new Float:x,Float:y,Float:z;
  173.  
  174.     if(sscanf(params,"fff",x,y,z))
  175.         return SendClientMessage(playerid,0xff0000FF,"ERROR: Usage /cgoto [x][y][z]");
  176.        
  177.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  178.         return SendClientMessage( playerid, -1, "You must be an admin level "COL_LIGHTBLUE"1{FFFFFF} or above.");
  179.     else
  180.     {
  181.         SetPlayerPos(playerid,x,y,z);
  182.     }
  183.     return 1;
  184. }
  185. CMD:myskin( playerid, params[ ] )
  186. {
  187.     if ( GetPVarInt( playerid, "Level" ) < 2 )
  188.         return SendClientMessage( playerid, -1, "You must be an admin level "COL_LIGHTBLUE"2{FFFFFF} or above.");
  189.     if ( GetPVarInt( playerid, "Logged" ) == 0 )
  190.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Please "COL_LIGHTBLUE"/login{FFFFFF} to change your skin.");
  191.  
  192.     if ( sscanf( params, "d", params[ 0 ] ) )
  193.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /myskin <skin>");
  194.  
  195.     if ( !IsValidSkin( params[ 0 ] ) )
  196.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Invalid skin ID.");
  197.  
  198.     SetPVarInt( playerid, "Skin", params[ 0 ] );
  199.     SetPlayerSkin( playerid, params[ 0 ] );
  200.  
  201.     new String[ 129 ];
  202.     format( String, sizeof String, "{FFFFFF}You set your time to "COL_LIGHTBLUE"%d{FFFFFF} and it has been saved into your account succesfully!", params[ 0 ] );
  203.     SendClientMessage( playerid, -1, String );
  204.  
  205.     new PlayerFile[ 13 + MAX_PLAYER_NAME ];
  206.  
  207.     format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  208.     new
  209.         INI:PlayerAcc = INI_Open( PlayerFile );
  210.     INI_WriteString( PlayerAcc, "MY_SKIN",  params[ 0 ]);
  211.     INI_Close( PlayerAcc );
  212.     return 1;
  213. }
  214.  
  215. CMD:changepass( playerid, params[ ] )
  216. {
  217.     if ( !INI_Exist( pName( playerid ) ) )
  218.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} You must be registered to change your pass.Use "COL_LIGHTBLUE"/register{FFFFFF}.");
  219.  
  220.     if ( GetPVarInt( playerid, "Logged" ) == 0 )
  221.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Please "COL_LIGHTBLUE"/login{FFFFFF} to change your password.");
  222.  
  223.     new NewPass[ 21 ], OldPass[ 21 ];
  224.     if ( sscanf( params, "ss", OldPass, NewPass ) )
  225.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /changepass [OLD] [NEW]");
  226.  
  227.     new PlayerFile[ 13 + MAX_PLAYER_NAME ];
  228.  
  229.     format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  230.     INI_ParseFile( PlayerFile, "ParsePlayerPass", false, true, playerid );
  231.  
  232.     new Password[ 20 ],
  233.         String[ 129 ]
  234.     ;
  235.     GetPVarString( playerid, "pPass", Password, 20 );
  236.  
  237.     if ( strcmp( Password, OldPass, false ) != 0 )
  238.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Old password didn't match the one you inserted!");
  239.  
  240.     if ( strlen( NewPass ) < 3 || strlen( NewPass ) > 20 )
  241.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} New password may contain Min. 3 Char. and Max. 20 Char.");
  242.  
  243.     format( String, sizeof String, "You have changed your password to \""COL_LIGHTBLUE"%s{FFFFFF}\" ", NewPass );
  244.     SendClientMessage( playerid, -1, String );
  245.  
  246.     format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  247.     new
  248.         INI:PlayerAcc = INI_Open( PlayerFile );
  249.     INI_WriteString( PlayerAcc, "OLD_PASSWORD", OldPass);
  250.     INI_WriteString( PlayerAcc, "PASSWORD",     NewPass);
  251.     INI_Close( PlayerAcc );
  252.     return 1;
  253. }
  254. CMD:mycmds( playerid, params[ ] )
  255. {
  256.     new LongString[ 1024 ];
  257.     new Str1[ ] =   ""COL_LIGHTBLUE"Available commands you can use{FFFFFF}\n\n\n\
  258.                     If you are a VIP Member use "COL_LIGHTBLUE"/viphelp{FFFFFF} to see available commands for VIP Members.\n";
  259.  
  260.     new Str2[ ] =   "Use "COL_LIGHTBLUE"/stats{FFFFFF} to view your stats, deats, kills etc!\n\
  261.                     Use "COL_LIGHTBLUE"/changepass{FFFFFF} to change your accounts's password.";
  262.     format( LongString, 1024, "%s%s", Str1, Str2 );
  263.     ShowPlayerDialog( playerid, INFO_BOX, DIALOG_STYLE_MSGBOX, "{FFFFFF}My commands", LongString, "Oke", "");
  264.     return 1;
  265. }
  266. stock GetPlayerLevelName( playerid )
  267. {
  268.     new Llevel[ 17 ];
  269.     if ( GetPVarInt( playerid, "Level" ) == 0 ) Llevel = Level0;
  270.     if ( GetPVarInt( playerid, "Level" ) == 1 ) Llevel = Level1;
  271.     if ( GetPVarInt( playerid, "Level" ) == 2 ) Llevel = Level2;
  272.     if ( GetPVarInt( playerid, "Level" ) == 3 ) Llevel = Level3;
  273.     if ( GetPVarInt( playerid, "Level" ) == 4 ) Llevel = Level4;
  274.     return Llevel;
  275. }
  276. stock GetPlayerVIPName( playerid )
  277. {
  278.     new Vlevel[ 17 ];
  279.     if ( GetPVarInt( playerid, "VIP Level" ) == 0 ) Vlevel = VIP_NO;
  280.     if ( GetPVarInt( playerid, "VIP Level" ) == 1 ) Vlevel = VIP_YES;
  281.     if ( GetPVarInt( playerid, "VIP Level" ) == 2 ) Vlevel = VIP_YES;
  282.     if ( GetPVarInt( playerid, "VIP Level" ) == 3 ) Vlevel = VIP_YES;
  283.     return Vlevel;
  284. }
  285.  
  286.  
  287. CMD:setlevel( playerid, params[ ] )
  288. {
  289.     if ( GetPVarInt( playerid, "Level" ) < 4 && !IsPlayerAdmin( playerid ) )
  290.         return SendClientMessage( playerid, -1, "You are not allowed to use this command");
  291.  
  292.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ) )
  293.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /setlevel <id/name> <level> "),SendClientMessage( playerid, -1, "-Check "COL_LIGHTBLUE"/levelranks{FFFFFF} to view each level's name");
  294.  
  295.     if ( !IsPlayerConnected( params[ 0 ] ) )
  296.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  297.  
  298.     if ( params[ 1 ] < 0 || params[ 1 ] > 4 )
  299.         return SendClientMessage( playerid, -1, "You must insert from level "COL_LIGHTBLUE"0{FFFFFF} to "COL_LIGHTBLUE"3{FFFFFF}");
  300.  
  301.     if ( GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  302.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  303.  
  304.  
  305.     SetPVarInt( params[ 0 ], "Level", params[ 1 ] );
  306.     new String[ 256 ];
  307.     if ( playerid == params[ 0 ] )
  308.     {
  309.         format( String, sizeof String, "You made yourself an admin level "COL_LIGHTBLUE"%d{FFFFFF}["COL_LIGHTBLUE"%s{FFFFFF}]", params[ 1 ], GetPlayerLevelName( playerid ) );
  310.         SendClientMessage( playerid, -1, String );
  311.     }
  312.     else
  313.     {
  314.         format( String, sizeof String, "You made "COL_LIGHTBLUE"%s{FFFFFF} an "COL_LIGHTBLUE"%s{FFFFFF} level "COL_LIGHTBLUE"%d",pName( params[ 0 ] ), GetPlayerLevelName( playerid ), params[ 1 ] );
  315.         SendClientMessage( playerid, -1, String );
  316.         format( String, sizeof String, "%s( %s ) made you an %s",pName( playerid ), GetPlayerLevelName( playerid ),GetPlayerLevelName( params[ 0 ] ) );
  317.         SendClientMessage( params[ 0 ], -1, String );
  318.     }
  319.     return 1;
  320. }
  321. CMD:setvip( playerid, params[ ] )
  322. {
  323.     if ( GetPVarInt( playerid, "Level" ) < 4 )
  324.         return SendClientMessage( playerid, -1, "You are not allowed to use this command!");
  325.  
  326.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ) )
  327.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /setvip <id/name> <level> ");
  328.  
  329.     if ( !IsPlayerConnected( params[ 0 ] ) )
  330.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  331.  
  332.     if ( params[ 1 ] < 0 || params[ 1 ] > 4 )
  333.         return SendClientMessage( playerid, -1, "You must insert from level "COL_LIGHTBLUE"0{FFFFFF} to "COL_LIGHTBLUE"3{FFFFFF}");
  334.  
  335.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  336.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  337.  
  338.  
  339.     SetPVarInt( params[ 0 ], "VIP Level", params[ 1 ] );
  340.     new String[ 256 ];
  341.     if ( playerid == params[ 0 ] )
  342.     {
  343.         format( String, sizeof String, "You made yourself a VIP level "COL_LIGHTBLUE"%d", params[ 1 ]);
  344.         SendClientMessage( playerid, -1, String );
  345.     }
  346.     else
  347.     {
  348.         format( String, sizeof String, "You made "COL_LIGHTBLUE"%s{FFFFFF} a VIP level %d", pName(  params[ 0 ] ),params[ 1 ] );
  349.         SendClientMessage( playerid, -1, String );
  350.         format( String, sizeof String, "%s( %s ) made you a VIP Level %d",pName( playerid ), GetPlayerLevelName( playerid ), params[ 1 ] );
  351.         SendClientMessage( params[ 0 ], -1, String );
  352.     }
  353.     return 1;
  354. }
  355. CMD:givegun(playerid, params[])
  356. {
  357.     new id, gun, ammo;
  358.    
  359.     if ( GetPVarInt( playerid, "Level" ) < 3 )
  360.         return SendClientMessage( playerid, -1, "You must be an "#Level3" to use this command");
  361.    
  362.     if(sscanf(params,"uii", id, gun, ammo)) return SendClientMessage(playerid, -1,"USAGE: /givegun [playerid/partofname] [gunid] [ammo]");
  363.  
  364.     if(gun > 47 || gun < 1) return SendClientMessage(playerid, -1,"GUN ID'S: 1-47");
  365.  
  366.     if(ammo > 999 || ammo < 1) return SendClientMessage(playerid, -1,"Ammo 1-999");
  367.  
  368.     GivePlayerWeapon(id, gun, ammo);
  369.  
  370.     return 1;
  371. }
  372. CMD:removegun(playerid, params[])
  373. {
  374.  
  375.     if ( GetPVarInt( playerid, "Level" ) < 3 )
  376.         return SendClientMessage( playerid, -1, "You must be an "#Level3" to use this command");
  377.  
  378.     if(sscanf(params,"u", playerid))
  379.        return SendClientMessage(playerid, -1,"USAGE: /removegun [playerid]");
  380.  
  381.     ResetPlayerWeapons(playerid);
  382.  
  383.     return 1;
  384. }
  385. CMD:setmoney( playerid,params[])
  386. {
  387.     if ( GetPVarInt( playerid, "Level" ) < 3 )
  388.         return SendClientMessage( playerid, -1, "You must be an "#Level3" to use this command");
  389.  
  390.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ) )
  391.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /setmoney <id/name> <money> ");
  392.  
  393.     if ( !IsPlayerConnected( params[ 0 ] ) )
  394.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  395.  
  396.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  397.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  398.  
  399.     ResetPlayerMoney( params[ 0 ] );
  400.     GivePlayerMoney( params[ 0 ], params[ 1 ] );
  401.  
  402.     new String[ 245 ];
  403.     format( String, sizeof String, "You gave "COL_LIGHTBLUE"%s{FFFFFF} "COL_GREEN"$%d{FFFFFF} moneys.", pName(  params[ 0 ] ),params[ 1 ] );
  404.     SendClientMessage( playerid, -1, String );
  405.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} set your cash to "COL_GREEN"$%d",pName( playerid ), GetPlayerLevelName( playerid ), params[ 1 ] );
  406.     SendClientMessage( params[ 0 ], -1, String );
  407.     return 1;
  408. }
  409. CMD:setscore( playerid,params[])
  410. {
  411.     if ( GetPVarInt( playerid, "Level" ) < 3 )
  412.         return SendClientMessage( playerid, -1, "You must be an "#Level3" to use this command");
  413.  
  414.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ))
  415.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /setscore <id/name> <score> ");
  416.  
  417.     if ( !IsPlayerConnected( params[ 0 ] ) )
  418.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  419.  
  420.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  421.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  422.  
  423.     SetPlayerScore( playerid, params[ 1 ] );
  424.  
  425.     new String[ 245 ];
  426.     format( String, sizeof String, "You set "COL_LIGHTBLUE"%s's{FFFFFF} score to "COL_LIGHTBLUE"%d", pName(  params[ 0 ] ),params[ 1 ] );
  427.     SendClientMessage( playerid, -1, String );
  428.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} set your score to "COL_LIGHTBLUE"%d",pName( playerid ), GetPlayerLevelName( playerid ), params[ 1 ] );
  429.     SendClientMessage( params[ 0 ], -1, String );
  430.     return 1;
  431. }
  432. CMD:setweather( playerid,params[])
  433. {
  434.     if ( GetPVarInt( playerid, "Level" ) < 2 )
  435.         return SendClientMessage( playerid, -1, "You must be an "#Level2" to use this command");
  436.  
  437.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ) )
  438.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /setweather <id/name> <weather> ");
  439.  
  440.     if ( !IsPlayerConnected( params[ 0 ] ) )
  441.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  442.  
  443.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  444.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  445.  
  446.     SetPlayerWeather( params[ 0 ], params[ 1 ]);
  447.  
  448.     new String[ 245 ];
  449.     format( String, sizeof String, "You set "COL_LIGHTBLUE"%s's{FFFFFF} weather to "COL_LIGHTBLUE"%d", pName(  params[ 0 ] ),params[ 1 ] );
  450.     SendClientMessage( playerid, -1, String );
  451.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} set your weather to "COL_LIGHTBLUE"%d",pName( playerid ), GetPlayerLevelName( playerid ), params[ 1 ] );
  452.     SendClientMessage( params[ 0 ], -1, String );
  453.     return 1;
  454. }
  455. CMD:sethealth( playerid,params[])
  456. {
  457.     if ( GetPVarInt( playerid, "Level" ) < 2 )
  458.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  459.  
  460.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ) )
  461.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /sethealth <id/name> <health> ");
  462.  
  463.     if ( !IsPlayerConnected( params[ 0 ] ) )
  464.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  465.  
  466.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  467.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  468.  
  469.     SetPlayerHealth( params[ 0 ], params[ 1 ]);
  470.  
  471.     new String[ 245 ];
  472.     format( String, sizeof String, "You set "COL_LIGHTBLUE"%s's{FFFFFF} health to "COL_LIGHTBLUE"%d", pName(  params[ 0 ] ),params[ 1 ] );
  473.     SendClientMessage( playerid, -1, String );
  474.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} set your health to "COL_LIGHTBLUE"%d",pName( playerid ), GetPlayerLevelName( playerid ), params[ 1 ] );
  475.     SendClientMessage( params[ 0 ], -1, String );
  476.     return 1;
  477. }
  478. CMD:setarmour( playerid,params[])
  479. {
  480.     if ( GetPVarInt( playerid, "Level" ) < 2 )
  481.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  482.  
  483.     if ( sscanf( params, "ui", params[ 0 ], params[ 1 ] ) )
  484.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /setarmour <id/name> <armour> ");
  485.  
  486.     if ( !IsPlayerConnected( params[ 0 ] ) )
  487.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  488.  
  489.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  490.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  491.  
  492.     SetPlayerArmour( params[ 0 ], params[ 1 ]);
  493.  
  494.     new String[ 245 ];
  495.     format( String, sizeof String, "You set "COL_LIGHTBLUE"%s's{FFFFFF} armour to "COL_LIGHTBLUE"%d", pName(  params[ 0 ] ), params[ 1 ] );
  496.     SendClientMessage( playerid, -1, String );
  497.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} set your armour to "COL_LIGHTBLUE"%d",pName( playerid ), GetPlayerLevelName( playerid ), params[ 1 ] );
  498.     SendClientMessage( params[ 0 ], -1, String );
  499.     return 1;
  500. }
  501. CMD:heal( playerid,params[])
  502. {
  503.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  504.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  505.  
  506.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  507.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /heal <id/name>");
  508.  
  509.     if ( !IsPlayerConnected( params[ 0 ] ) )
  510.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  511.  
  512.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  513.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  514.  
  515.     SetPlayerHealth( params[ 0 ], 100.0);
  516.  
  517.     new String[ 245 ];
  518.     format( String, sizeof String, "You healed "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ));
  519.     SendClientMessage( playerid, -1, String );
  520.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} healed you.",pName( playerid ), GetPlayerLevelName( playerid ));
  521.     SendClientMessage( params[ 0 ], -1, String );
  522.     return 1;
  523. }
  524. CMD:akill( playerid,params[])
  525. {
  526.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  527.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  528.  
  529.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  530.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /akill <id/name>");
  531.  
  532.     if ( !IsPlayerConnected( params[ 0 ] ) )
  533.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  534.  
  535.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  536.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  537.  
  538.     SetPlayerHealth( params[ 0 ], 0.0);
  539.  
  540.     new String[ 245 ];
  541.     format( String, sizeof String, "You killed "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ));
  542.     SendClientMessage( playerid, -1, String );
  543.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} killed you.",pName( playerid ), GetPlayerLevelName( playerid ));
  544.     SendClientMessage( params[ 0 ], -1, String );
  545.     return 1;
  546. }
  547. CMD:mute( playerid,params[])
  548. {
  549.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  550.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  551.  
  552.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  553.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /mute <id/name>");
  554.  
  555.     if ( GetPVarInt( playerid, "Muted" ) == 1 )
  556.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Player is already muted.");
  557.  
  558.     if ( !IsPlayerConnected( params[ 0 ] ) )
  559.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  560.  
  561.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  562.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  563.  
  564.     SetPVarInt( params[ 0 ], "Muted", 1 );
  565.  
  566.     new String[ 245 ];
  567.     format( String, sizeof String, "You muted "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ));
  568.     SendClientMessage( playerid, -1, String );
  569.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} muted you.",pName( playerid ), GetPlayerLevelName( playerid ));
  570.     SendClientMessage( params[ 0 ], -1, String );
  571.     return 1;
  572. }
  573. CMD:unmute( playerid,params[])
  574. {
  575.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  576.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  577.  
  578.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  579.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /mute <id/name>");
  580.  
  581.     if ( GetPVarInt( playerid, "Muted" ) == 0 )
  582.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Player is already un-muted.");
  583.  
  584.     if ( !IsPlayerConnected( params[ 0 ] ) )
  585.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  586.  
  587.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  588.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  589.  
  590.     SetPVarInt(  params[ 0 ], "Muted", 0 );
  591.  
  592.     new String[ 245 ];
  593.     format( String, sizeof String, "You unmuted "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ));
  594.     SendClientMessage( playerid, -1, String );
  595.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} unmuted you.",pName( playerid ), GetPlayerLevelName( playerid ));
  596.     SendClientMessage( params[ 0 ], -1, String );
  597.     return 1;
  598. }
  599. CMD:freeze( playerid,params[])
  600. {
  601.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  602.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  603.  
  604.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  605.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /freeze <id/name>");
  606.  
  607.     if ( GetPVarInt( playerid, "Freeze" ) == 1 )
  608.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Player is already frozen.");
  609.  
  610.     if ( !IsPlayerConnected( params[ 0 ] ) )
  611.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  612.  
  613.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  614.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  615.  
  616.     SetPVarInt(  params[ 0 ], "Freeze", 1 );
  617.     TogglePlayerControllable( playerid, false );
  618.  
  619.     new String[ 245 ];
  620.     format( String, sizeof String, "You frozen "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ));
  621.     SendClientMessage( playerid, -1, String );
  622.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} frozen you.",pName( playerid ), GetPlayerLevelName( playerid ));
  623.     SendClientMessage( params[ 0 ], -1, String );
  624.     return 1;
  625. }
  626. CMD:unfreeze( playerid,params[])
  627. {
  628.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  629.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  630.  
  631.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  632.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /freeze <id/name>");
  633.  
  634.     if ( GetPVarInt( playerid, "Freeze" ) == 0 )
  635.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} Player is already unfrozen.");
  636.  
  637.     if ( !IsPlayerConnected( params[ 0 ] ) )
  638.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  639.  
  640.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  641.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  642.  
  643.     SetPVarInt(  params[ 0 ], "Freeze", 0 );
  644.     TogglePlayerControllable( playerid, true );
  645.  
  646.     new String[ 245 ];
  647.     format( String, sizeof String, "You unfrozen "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ));
  648.     SendClientMessage( playerid, -1, String );
  649.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} unfrozen you.",pName( playerid ), GetPlayerLevelName( playerid ));
  650.     SendClientMessage( params[ 0 ], -1, String );
  651.     return 1;
  652. }
  653. CMD:spawn( playerid,params[])
  654. {
  655.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  656.         return SendClientMessage( playerid, -1, "You must be an "#Level1" to use this command");
  657.  
  658.     if ( sscanf( params, "u", params[ 0 ], params[ 1 ] ) )
  659.         return SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Usage:{FFFFFF} /spawn <id/name>");
  660.  
  661.     if ( !IsPlayerConnected( params[ 0 ] ) )
  662.         return SendClientMessage( playerid, -1, ""COL_RED"Player is not connected");
  663.  
  664.     if (GetPVarInt( playerid, "Level" ) < GetPVarInt( params[ 0 ], "Level" ) )
  665.         return SendClientMessage( playerid, -1, "You are not allowed to use this command on this admin."),SendClientMessage( playerid, -1, "REASON: Player is higher in grade than you.");
  666.  
  667.     SpawnPlayer( params[ 0 ] );
  668.  
  669.     new String[ 245 ];
  670.     format( String, sizeof String, "You spawned "COL_LIGHTBLUE"%s", pName(  params[ 0 ] ) );
  671.     SendClientMessage( playerid, -1, String );
  672.     format( String, sizeof String, ""COL_LIGHTBLUE"%s( %s ){FFFFFF} spawned you.",pName( playerid ), GetPlayerLevelName( playerid ));
  673.     SendClientMessage( params[ 0 ], -1, String );
  674.     return 1;
  675. }
  676. CMD:vipgod( playerid,params[])
  677. {
  678.     if ( GetPVarInt( playerid, "VIP Level" ) < 1 )
  679.         return SendClientMessage( playerid, -1, "You must be an VIP to use this command");
  680.  
  681.     if ( GetPVarInt( playerid, "God" ) == 0 )
  682.     {
  683.         SetPVarInt( playerid, "God", 1);
  684.         God[ playerid ] = SetTimerEx( "GodTimer", 200, true, "i", playerid );
  685.         SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"God Fature{FFFFFF} is now enabled!");
  686.     }
  687.     else
  688.     {
  689.         SetPVarInt( playerid, "God", 0);
  690.         KillTimer( God[ playerid ] );
  691.         SetPlayerHealth( playerid, 100.0 );
  692.         SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"God Feature{FFFFFF} is now disabled!");
  693.     }
  694.     return 1;
  695. }
  696. CMD:vipcargod( playerid,params[])
  697. {
  698.     if ( GetPVarInt( playerid, "VIP Level" ) < 1 )
  699.         return SendClientMessage( playerid, -1, "You must be an VIP to use this command");
  700.  
  701.     if ( GetPVarInt( playerid, "CGod" ) == 0 )
  702.     {
  703.         SetPVarInt( playerid, "CGod", 1);
  704.         CGod[ playerid ] = SetTimerEx( "CarGodTimer", 200, true, "i", playerid );
  705.         SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Car God Fature{FFFFFF} is now enabled!");
  706.     }
  707.     else
  708.     {
  709.         SetPVarInt( playerid, "CGod", 0);
  710.         KillTimer( CGod[ playerid ] );
  711.         SetVehicleHealth( GetPlayerVehicleID( playerid ), 1000.0 );
  712.         SendClientMessage( playerid, -1, ""COL_LIGHTBLUE"Car God Fature{FFFFFF} is now disabled!");
  713.     }
  714.     return 1;
  715. }
  716. CMD:acmds( playerid, params[ ] )
  717. {
  718.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  719.         return SendClientMessage( playerid, -1, "You must be an Admin level 1 or above to view the commands");
  720.  
  721.     new CBox[ 512 ];
  722.     format( CBox, sizeof CBox, "{FFFFFF}Current Admin commands\n\n\n\
  723.                                 "COL_RED"Level {FFFFFF}1 "COL_RED"- {FFFFFF}( "COL_RED""Level1" {FFFFFF})\n\
  724.                                 /heal /kick /mute /unmute /freeze /unfreeze /akill /spawn \n\n\
  725.                                 "COL_RED"Level {FFFFFF}2 "COL_RED"- {FFFFFF}( "COL_RED""Level2" {FFFFFF})\n");
  726.  
  727.     format( CBox, sizeof CBox,  "%s/ban /sethealth /setweather /setarmor \n\n\
  728.                                 "COL_RED"Level {FFFFFF}3 "COL_RED"- {FFFFFF}( "COL_RED""Level3" {FFFFFF})\n\
  729.                                 /restart /setmoney /setscore\n\n\n\
  730.                                 Please take a look at the Admin Rules -> "COL_RED"/arules", CBox);
  731.     ShowPlayerDialog( playerid, INFO_BOX, DIALOG_STYLE_MSGBOX, "{FFFFFF}Admin Commands", CBox, "Oke", "");
  732.     return 1;
  733. }
  734. CMD:viphelp( playerid, params[ ] )
  735. {
  736.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  737.         return SendClientMessage( playerid, -1, "You must be a VIP Member to use this command");
  738.  
  739.     ShowPlayerDialog( playerid, INFO_BOX, DIALOG_STYLE_MSGBOX, "{FFFFFF}Admin Commands",    "{FFFFFF}Few VIP Commands.\n\n\n\
  740.                                                                                             "COL_LIGHTBLUE"\n\
  741.                                                                                             /vipgod /vipcargod \n\n\n", "Oke", "");
  742.     return 1;
  743. }
  744. CMD:arules( playerid, params[ ] )
  745. {
  746.     if ( GetPVarInt( playerid, "Level" ) < 1 )
  747.         return SendClientMessage( playerid, -1, "You must be an Admin level 1 or above to view the Admin Rules");
  748.  
  749.     new CBox[ 700 ];
  750.     format( CBox, sizeof CBox, "{FFFFFF}Current Admin Rules\n\n\n\
  751.                                 "COL_RED"Level {FFFFFF}1 "COL_RED"- {FFFFFF}( "COL_RED""Level1" {FFFFFF})\n\
  752.                                 -Your duty is to ensure a player's pleasure to play on the server, set his time\n\
  753.                                 set his wather, etc.\n\n\
  754.                                 "COL_RED"Level {FFFFFF}2 "COL_RED"- {FFFFFF}( "COL_RED""Level2" {FFFFFF})\n");
  755.  
  756.     format( CBox, sizeof CBox, "%s-Your job is to ensure nobody abuses the commands, or insults players\n\
  757.                                 you must take control over mean players and punish them.\n\n\
  758.                                 "COL_RED"Level {FFFFFF}3 "COL_RED"- {FFFFFF}( "COL_RED""Level3" {FFFFFF})\n\
  759.                                 -The "Level3" can do whatever they want, you cannot judge their actions.\n\n\n\
  760.                                 Please take a look at the Admin Commands -> "COL_RED"/acmds", CBox);
  761.     ShowPlayerDialog( playerid, INFO_BOX, DIALOG_STYLE_MSGBOX, "{FFFFFF}Admin Commands", CBox, "Oke", "");
  762.     return 1;
  763. }
  764. CMD:stats( playerid, paramz[ ] )
  765. {
  766.     if ( GetPVarInt( playerid, "Logged" ) == 0 )
  767.         return SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} To view your stats you must be logged in ");
  768.  
  769.     new
  770.         iBox[ 1024 ],
  771.         RegDate[ 40 ],
  772.         pLastOn[ 20 + 20 ],
  773.         pLevel = GetPVarInt( playerid, "Level");
  774.     GetPVarString( playerid, "Date", RegDate, sizeof RegDate );
  775.     GetPVarString( playerid, "On", pLastOn, sizeof pLastOn );
  776.  
  777.     format( iBox, sizeof iBox, "{FFFFFF}Hello "COL_LIGHTBLUE"%s{FFFFFF}, these are your stats\n\n\
  778.                                 {FFFFFF}Admin level: "COL_LIGHTBLUE"%s{FFFFFF}["COL_LIGHTBLUE"%d{FFFFFF}]\n\
  779.                                 {FFFFFF}VIP: "COL_LIGHTBLUE"%s\n\
  780.                                 {FFFFFF}Money: "COL_LIGHTBLUE"%d\n\
  781.                                 {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
  782.                                 {FFFFFF}Kills: "COL_LIGHTBLUE"%d\n\
  783.                                 {FFFFFF}Deaths: "COL_LIGHTBLUE"%d\n\
  784.                                 {FFFFFF}Registration Date: "COL_LIGHTBLUE"%s\n\
  785.                              {FFFFFF}Interior: "COL_LIGHTBLUE"%d\n",
  786.                                               pName( playerid ),
  787.                                               GetPlayerLevelName( playerid ),
  788.                                               pLevel,
  789.                                               GetPlayerVIPName( playerid ),
  790.                                               GetPlayerMoney( playerid ),
  791.                                               GetPlayerScore( playerid ),
  792.                                               GetPVarInt( playerid,"Kills" ),
  793.                                               GetPVarInt( playerid,"Deaths" ),
  794.                                               RegDate,
  795.              GetPlayerInterior( playerid ) );
  796.  
  797.     format( iBox, sizeof iBox, "{FFFFFF}Last On: "COL_LIGHTBLUE"%s\n\
  798.                                 {FFFFFF}Car God: "COL_LIGHTBLUE"%s\n\
  799.                                 {FFFFFF}Player God: "COL_LIGHTBLUE"%s",
  800.                                               iBox,
  801.                                               pLastOn,
  802.                                               GetPVarInt( playerid, "CGod" ) ? (""COL_GREEN"Yes") : (""COL_RED"No"),
  803.                                               GetPVarInt( playerid, "God" ) ? (""COL_GREEN"Yes") : (""COL_RED"No"));
  804.  
  805.     ShowPlayerDialog( playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "{FFFFFF}Your Stats!", iBox, "Ok", "");
  806.     return 1;
  807. }
  808. public OnGameModeInit()
  809. {
  810.     ////////////////Time/////////////////////////
  811.     Servt=TextDrawCreate(545, 31, "00:00");
  812.     TextDrawColor(Servt, COLOR_WHITE);
  813.     Tsec= 0;
  814.     THrs= 0;
  815.     SetTimer("TimeU",1000,true);
  816.     //////////////////////////////////////////////////////////////////
  817.     //////////////Weather/////////////////////////////////////////////
  818.     SetTimer("RandomWeather",10000,true);
  819.     RandomWeather();
  820.  
  821.     ////////////////////////////////////////////////////////////////////////////////////////
  822.     /////////////////////////////////////////////Vehicles///////////////////////////////////
  823.     ////////////////////////////////////////////////////////////////////////////////////////
  824.     AddStaticVehicle(485,1315.9512,1279.0198,10.4741,358.3896,5,74); //Baggage LVA
  825.     AddStaticVehicle(485,1313.0264,1279.1273,10.4678,358.6127,1,78); //Baggage LVA
  826.     AddStaticVehicle(519,1285.9851,1361.0000,11.7451,269.9990,1,1); // Shamal LVA
  827.     AddStaticVehicle(511,1289.9883,1409.9996,12.1856,270.9994,7,68); // Beagle LVA
  828.     AddStaticVehicle(511,1270.9915,1408.9896,12.2009,268.7778,4,90); // Beagle LVA
  829.     /////////////////////////////////////////////////////////////////////////////////////////
  830.     SetGameModeText("Sambo's Freeroam");
  831.     return 1;
  832. }
  833. public OnPlayerDeath( playerid, killerid, reason )
  834. {
  835.     SetPVarInt( killerid, "Kills",  GetPVarInt( playerid, "Kills" ) + 1 );
  836.     SetPVarInt( playerid, "Deaths", GetPVarInt( playerid, "Deaths" ) + 1 );
  837.     return 1;
  838. }
  839. public OnPlayerText( playerid, text[] )
  840. {
  841.     if ( GetPVarInt( playerid, "Muted" ) == 1 && !IsPlayerAdmin( playerid ) )
  842.     {
  843.         SendClientMessage( playerid, -1, ""COL_RED"ERROR:{FFFFFF} You are muted, you cannot chat!");
  844.     }
  845.     return 1;
  846. }
  847. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  848. {
  849.     switch( dialogid )
  850.     {
  851.         case DIALOG_REG:
  852.         {
  853.             if ( response )
  854.             {
  855.                 if ( sscanf( inputtext, "s", inputtext[ 0 ] || strlen( inputtext[ 0 ] ) == 0 ) )
  856.                     return ShowPlayerDialog( playerid, DIALOG_REG, DIALOG_STYLE_INPUT, "{FFFFFF}Password", ""COL_RED"Error!\n\
  857.                                                                                             {FFFFFF}Please write your desired password.\n",
  858.                                                                                             ">>>", "Exit");
  859.                 if ( strlen( inputtext[ 0 ] ) < 3 || strlen( inputtext[ 0 ] ) > 20 )
  860.                     return ShowPlayerDialog( playerid, DIALOG_REG, DIALOG_STYLE_INPUT, "{FFFFFF}Password", ""COL_RED"Error!\n\
  861.                                                                                             {FFFFFF}Please write your desired password.\n\
  862.                                                                                             "COL_RED"#{FFFFFF}Min. 3 Char. Max. 20 Char.",
  863.                                                                                             ">>>", "Exit");
  864.                 new
  865.                     PlayerFile[ 13 + MAX_PLAYER_NAME ],
  866.                     pDate[ 8 + 15 ], //HH:MM:SS + DD.MM.YYYY = 18
  867.                     pYear,
  868.                     pMonth,
  869.                     pDay,
  870.                     pHour,
  871.                     pMinute,
  872.                     pSecond,
  873.                     pIP[ 20 ],
  874.                     InfBox[ 512 ]
  875.                 ;
  876.                 getdate(pYear, pMonth, pDay ),gettime(pHour, pMinute, pSecond );
  877.                 GetPlayerIp( playerid, pIP, 20 );
  878.  
  879.  
  880.                 format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  881.                 format( pDate, sizeof pDate, "%d:%d:%d  %d/%d/%d",pHour, pMinute, pSecond , pDay, pMonth, pYear );
  882.                 format( InfBox, sizeof InfBox, "{FFFFFF}You registered your account with success!\n\n\
  883.                                                         "COL_LIGHTBLUE"Account: {FFFFFF}%s\n\
  884.                                                         "COL_LIGHTBLUE"Password: {FFFFFF}%s\n\n\
  885.                                                         You received "COL_GREEN"$5000{FFFFFF} for registering.\n\
  886.                                                         Would you like to login?", pName( playerid ),
  887.                                                                                  inputtext       );
  888.                 ShowPlayerDialog( playerid, DIALOG_LOG, DIALOG_STYLE_MSGBOX, "Login", InfBox, "Yes", "No" );
  889.  
  890.  
  891.                 new
  892.                     INI:PlayerAcc = INI_Open( PlayerFile );
  893.  
  894.                 INI_WriteString( PlayerAcc, "NAME",               pName( playerid )    );
  895.                 INI_WriteString( PlayerAcc, "PASSWORD",           inputtext            );
  896.                 INI_WriteString( PlayerAcc, "REG_DATE",           pDate                );
  897.                 INI_WriteString( PlayerAcc, "LAST_ON",            "First connection"   );
  898.                 INI_WriteInt( PlayerAcc,    "MONEY",             5000                 );
  899.                 INI_WriteInt( PlayerAcc,    "SCORE",              15                   );
  900.                 INI_WriteInt( PlayerAcc,    "KILLS",              0                    );
  901.                 INI_WriteInt( PlayerAcc,    "DEATHS",             0                    );
  902.                 INI_WriteInt( PlayerAcc,    "VIP_LEVEL",          0                    );
  903.                 INI_WriteInt( PlayerAcc,    "LEVEL",              0                    );
  904.                 INI_WriteInt( PlayerAcc,    "MY_SKIN",            61                    );
  905.                 INI_WriteInt( PlayerAcc,    "MY_TIME",            12                   );
  906.                 INI_WriteInt( PlayerAcc,    "MY_WEATHER",         1                    );
  907.  
  908.                 INI_Close( PlayerAcc );
  909.  
  910.                 SetPVarString( playerid, "Date", pDate );
  911.                 SetPVarInt( playerid, "Logged", 0 );
  912.                 GivePlayerMoney( playerid, 5000 );
  913.                 SetPlayerScore( playerid, GetPlayerScore( playerid ) + 15 );
  914.  
  915.  
  916.             }
  917.         }
  918.         case DIALOG_REG_REQ:
  919.         {
  920.             if ( response ) cmd_register( playerid, "");
  921.             if ( !response ) return 0;
  922.  
  923.         }
  924.  
  925.         case DIALOG_LOGIN: ShowPlayerDialog( playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, "{FFFFFF}Password",
  926.                                                                                           "{FFFFFF}Please write your current password.",
  927.                                                                                           "Login", "Leave");
  928.  
  929.         case DIALOG_LOG:
  930.         {
  931.             if ( response )
  932.                 ShowPlayerDialog( playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, "{FFFFFF}Password",  "{FFFFFF}Please write your current password.","Login","Kick");
  933.         }
  934.         case DIALOG_LOGIN2:
  935.         {
  936.             if ( !response ) return Kick( playerid );
  937.             if ( response )
  938.             {
  939.                 if ( strlen( inputtext ) == 0 )
  940.                     return ShowPlayerDialog( playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, "{FFFFFF}Password",   ""COL_RED"Error!\n\
  941.                                                                                                                 {FFFFFF}Please write your current password.",
  942.                                                                                                                 "Login", "Kick");
  943.  
  944.                 new
  945.                     PlayerFile[ 13 + MAX_PLAYER_NAME ],
  946.                     Password[ 20 + 1 ]
  947.                 ;
  948.                 format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  949.                 INI_ParseFile( PlayerFile, "ParsePlayerPass", false, true, playerid );
  950.                 GetPVarString( playerid, "pPass", Password, sizeof Password );
  951.  
  952.                 if ( !strcmp ( inputtext, Password, false ) )
  953.                 {
  954.                     new
  955.                         sTitle[ 21 + MAX_PLAYER_NAME + 25 ],
  956.                         sBoxInfo[ 512 ],
  957.                         Pdata[ 8 + 15 ]
  958.                     ;
  959.  
  960.                     SetPVarInt( playerid, "Logged", 1 );
  961.                     format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  962.                     INI_ParseFile( PlayerFile, "LoadUser", false, true, playerid, true, false );
  963.                     GetPVarString( playerid, "Date", Pdata, 8 + 10 );
  964.  
  965.  
  966.                     if ( GetPVarInt( playerid, "CGod" ) == 1 )
  967.                     {
  968.                         SetPVarInt( playerid, "CGod", 1);
  969.                         CGod[ playerid ] = SetTimerEx( "CarGodTimer", 200, true, "i", playerid );
  970.                     }
  971.                     if ( GetPVarInt( playerid, "God" ) == 1 )
  972.                     {
  973.                         SetPVarInt( playerid, "God", 1);
  974.                         God[ playerid ] = SetTimerEx( "GodTimer", 200, true, "i", playerid );
  975.                     }
  976.                     format( sTitle, sizeof sTitle, "{FFFFFF}Welcome back, "COL_LIGHTBLUE"%s{FFFFFF}!", pName( playerid ) );
  977.                     if ( GetPVarInt( playerid, "Level" ) == 0 )
  978.                     {
  979.                     format( sBoxInfo, sizeof sBoxInfo, "{FFFFFF}These are your stats:\n\n\
  980.                                                         {FFFFFF}Rank: "COL_LIGHTBLUE"%s\n\
  981.                                                         {FFFFFF}VIP: "COL_LIGHTBLUE"%s\n\
  982.                                                         {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
  983.                                                         {FFFFFF}Registered on: "COL_LIGHTBLUE"%s\n\n\
  984.                                                         {FFFFFF}To view more stats please type to "COL_LIGHTBLUE"/stats\n\
  985.                                                         {FFFFFF}Type "COL_LIGHTBLUE"/mycmds{FFFFFF} to view your current commands.",
  986.                                                                                                    GetPlayerLevelName( playerid ),
  987.                                                                                                    GetPlayerVIPName( playerid ),
  988.                                                                                                    GetPVarInt( playerid, "Score" ),
  989.                                                                                                    Pdata );
  990.                     }
  991.                     if ( GetPVarInt( playerid, "Level" ) > 1 )
  992.                     {
  993.                     format( sBoxInfo, sizeof sBoxInfo, "{FFFFFF}These are your stats:\n\n\
  994.                                                         {FFFFFF}Level: "COL_LIGHTBLUE"%s\n\
  995.                                                         {FFFFFF}VIP: "COL_LIGHTBLUE"%s\n\
  996.                                                         {FFFFFF}Score: "COL_LIGHTBLUE"%d\n\
  997.                                                         {FFFFFF}Registered on: "COL_LIGHTBLUE"%s\n\n",
  998.                                                                                                    GetPlayerLevelName( playerid ),
  999.                                                                                                    GetPlayerVIPName( playerid ),
  1000.                                                                                                    GetPVarInt( playerid, "Score" ),
  1001.                                                                                                    Pdata );
  1002.  
  1003.                     format( sBoxInfo, sizeof sBoxInfo,  "%s{FFFFFF}To view more stats please type to "COL_LIGHTBLUE"/stats\n\
  1004.                                                         {FFFFFF}Type "COL_LIGHTBLUE"/mycmds{FFFFFF} to view your current commands.\n\
  1005.                                                         "COL_RED"Admin note:{FFFFFF}Use "COL_LIGHTBLUE"/acmds {FFFFFF}and "COL_LIGHTBLUE"/arules {FFFFFF}for commands and Admin rules.",sBoxInfo);
  1006.                     }
  1007.                     ShowPlayerDialog(playerid, DIALOG_LOG_DONE, DIALOG_STYLE_MSGBOX, sTitle, sBoxInfo, "Ok", "");
  1008.  
  1009.                 }
  1010.                 else ShowPlayerDialog(playerid, DIALOG_LOGIN2, DIALOG_STYLE_INPUT, ""COL_RED"Wrong password...", ""COL_RED"Wrong password!\n{FFFFFF}Please try again.", "Login", "Kick");
  1011.  
  1012.  
  1013.             }
  1014.         }
  1015.     }
  1016.     return 1;
  1017. }
  1018.  
  1019. public OnPlayerConnect(playerid)
  1020. {
  1021.     if ( !INI_Exist( pName( playerid ) ) )
  1022.         ShowPlayerDialog( playerid, DIALOG_REG_REQ, DIALOG_STYLE_MSGBOX, "{FFFFFF}Password", "{FFFFFF}To play you must register an account!", "Ok", "");
  1023.     else
  1024.         ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_MSGBOX, "{FFFFFF}Password", "{FFFFFF}Your name is registered, would you like to login?", "Yes", "No");
  1025.  
  1026.     PlayerAFK[playerid] = 0;
  1027.     return 1;
  1028. }
  1029. public OnPlayerRequestSpawn( playerid )
  1030. {
  1031.     SetTimerEx("LoadFav", 200, false , "i" , playerid );
  1032.     return 1;
  1033. }
  1034. public OnPlayerSpawn(playerid)
  1035. {
  1036. TextDrawShowForPlayer(playerid,Servt);
  1037.  
  1038. return 1;
  1039. }
  1040. public OnPlayerRequestClass(playerid, classid)
  1041. {
  1042.     SetSpawnInfo( playerid, 0, 61, 1319.6895, 1261.3960, 10.8436, 0.0000, 0, 0, 0, 0, 0, 0 );
  1043.     TogglePlayerControllable( playerid, true );
  1044. }
  1045. forward LoadFav( playerid );
  1046. public LoadFav( playerid )
  1047. {
  1048.     GivePlayerMoney ( playerid, GetPVarInt( playerid, "Money"  )    );
  1049.     SetPlayerScore  ( playerid, GetPVarInt( playerid, "Score"   )    );
  1050. }
  1051. public OnPlayerDisconnect(playerid, reason)
  1052. {
  1053.     if ( GetPVarInt( playerid, "Logged" ) == 1 && INI_Exist( pName( playerid ) ) )
  1054.     {
  1055.         new
  1056.             PlayerFile[ 13 + MAX_PLAYER_NAME + 1],
  1057.             tDate[ 40 ],
  1058.             Year,
  1059.             Month,
  1060.             Day,
  1061.             Hour,
  1062.             Minute,
  1063.             Second
  1064.         ;
  1065.  
  1066.         format( PlayerFile , sizeof PlayerFile, "Accounts/%s.ini", Encode( pName( playerid ) ) );
  1067.         getdate( Year,Month,Day );
  1068.         gettime( Hour,Minute,Second );
  1069.         format( tDate, sizeof tDate, "%d/%d/%d at %d:%d:%d", Day,Month,Year,Hour,Minute,Second);
  1070.  
  1071.         new
  1072.             INI:PlayerAcc = INI_Open( PlayerFile );
  1073.  
  1074.         INI_WriteInt( PlayerAcc,    "MONEY",        GetPlayerMoney( playerid )          );
  1075.         INI_WriteInt( PlayerAcc,    "SCORE",        GetPlayerScore( playerid )          );
  1076.         INI_WriteInt( PlayerAcc,    "KILLS",        GetPVarInt( playerid, "Kills" )     );
  1077.         INI_WriteInt( PlayerAcc,    "DEATHS",       GetPVarInt( playerid, "Deaths" )    );
  1078.         INI_WriteInt( PlayerAcc,    "LEVEL",        GetPVarInt( playerid, "Level" )     );
  1079.         INI_WriteInt( PlayerAcc,    "VIP_LEVEL",    GetPVarInt( playerid, "VIP Level" ) );
  1080.         INI_WriteInt( PlayerAcc,    "MY_WEATHER",   GetPVarInt( playerid, "Weather" )   );
  1081.         INI_WriteInt( PlayerAcc,    "MY_TIME",      GetPVarInt( playerid, "Time" )      );
  1082.         INI_WriteInt( PlayerAcc,    "MY_SKIN",      GetPVarInt( playerid, "Skin" )      );
  1083.         INI_WriteInt( PlayerAcc,    "MUTED",        GetPVarInt( playerid, "Muted" )     );
  1084.         INI_WriteInt( PlayerAcc,    "GOD",          GetPVarInt( playerid, "God" )       );
  1085.         INI_WriteInt( PlayerAcc,    "CAR_GOD",      GetPVarInt( playerid, "CGod" )      );
  1086.         INI_WriteString( PlayerAcc, "LAST_ON",      tDate                               );
  1087.         INI_Close( PlayerAcc );
  1088.     }
  1089.     SetPVarInt( playerid, "Logged", 0 );
  1090.     return 1;
  1091. }
  1092. //Stocks
  1093. stock GetPlayerVLevel( playerid ) return GetPVarInt( playerid, "VIP Level" );
  1094. stock GetMySkin( playerid ) return GetPVarInt( playerid, "Skin" );
  1095. stock GetMyTime( playerid ) return GetPVarInt( playerid, "Time" );
  1096. stock GetMyWeather( playerid ) return GetPVarInt( playerid, "Weather" );
  1097.  
  1098.  
  1099. stock IsValidSkin(SkinID)
  1100. {
  1101.     if ( ( SkinID == 0 ) ||
  1102.          ( SkinID == 7 ) ||
  1103.          ( SkinID >= 9 && SkinID <= 41 ) ||
  1104.          ( SkinID >= 43 && SkinID <= 64 ) ||
  1105.          ( SkinID >= 66 && SkinID <= 73 ) ||
  1106.          ( SkinID >= 75 && SkinID <= 85 ) ||
  1107.          ( SkinID >= 87 && SkinID <= 118 ) ||
  1108.          ( SkinID >= 120 && SkinID <= 148 ) ||
  1109.          ( SkinID >= 150 && SkinID <= 207 ) ||
  1110.          ( SkinID >= 209 && SkinID <= 264 ) ||
  1111.          ( SkinID >= 274 && SkinID <= 288 ) ||
  1112.          ( SkinID >= 290 && SkinID <= 299 ) )
  1113.         return true;
  1114.     else return false;
  1115. }
  1116.  
  1117. stock INI_Exist(nickname[])
  1118. {
  1119.   new tmp[255];
  1120.   format(tmp,sizeof(tmp),"Accounts/%s.ini",Encode( nickname ) );
  1121.   return fexist(tmp);
  1122. }
  1123.  
  1124. stock pName( playerid )
  1125. {
  1126.     new Name[ MAX_PLAYER_NAME ];
  1127.     GetPlayerName( playerid, Name, sizeof( Name ) );
  1128.     return Name;
  1129. }
  1130.  
  1131. //DracoBlue
  1132. stock Encode(nickname[])
  1133. {
  1134.   new tmp[255];
  1135.   set(tmp,nickname);
  1136.   tmp=strreplace("_","_00",tmp);
  1137.   tmp=strreplace(";","_01",tmp);
  1138.   tmp=strreplace("!","_02",tmp);
  1139.   tmp=strreplace("/","_03",tmp);
  1140.   tmp=strreplace("\\","_04",tmp);
  1141.   tmp=strreplace("[","_05",tmp);
  1142.   tmp=strreplace("]","_06",tmp);
  1143.   tmp=strreplace("?","_07",tmp);
  1144.   tmp=strreplace(".","_08",tmp);
  1145.   tmp=strreplace("*","_09",tmp);
  1146.   tmp=strreplace("<","_10",tmp);
  1147.   tmp=strreplace(">","_11",tmp);
  1148.   tmp=strreplace("{","_12",tmp);
  1149.   tmp=strreplace("}","_13",tmp);
  1150.   tmp=strreplace(" ","_14",tmp);
  1151.   tmp=strreplace("\"","_15",tmp);
  1152.   tmp=strreplace(":","_16",tmp);
  1153.   tmp=strreplace("|","_17",tmp);
  1154.   tmp=strreplace("=","_18",tmp);
  1155.   return tmp;
  1156. }
  1157. stock set(dest[],source[]) {
  1158.     new count = strlen(source);
  1159.     new i=0;
  1160.     for (i=0;i<count;i++) {
  1161.         dest[i]=source[i];
  1162.     }
  1163.     dest[count]=0;
  1164. }
  1165. stock strreplace(trg[],newstr[],src[]) {
  1166.     new f=0;
  1167.     new s1[255];
  1168.     new tmp[255];
  1169.     format(s1,sizeof(s1),"%s",src);
  1170.     f = strfind(s1,trg);
  1171.     tmp[0]=0;
  1172.     while (f>=0) {
  1173.         strcat(tmp,ret_memcpy(s1, 0, f));
  1174.         strcat(tmp,newstr);
  1175.         format(s1,sizeof(s1),"%s",ret_memcpy(s1, f+strlen(trg), strlen(s1)-f));
  1176.         f = strfind(s1,trg);
  1177.     }
  1178.     strcat(tmp,s1);
  1179.     return tmp;
  1180. }
  1181. ret_memcpy(source[],index=0,numbytes) {
  1182.     new tmp[255];
  1183.     new i=0;
  1184.     tmp[0]=0;
  1185.     if (index>=strlen(source)) return tmp;
  1186.     if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index;
  1187.     if (numbytes<=0) return tmp;
  1188.     for (i=index;i<numbytes+index;i++) {
  1189.         tmp[i-index]=source[i];
  1190.         if (source[i]==0) return tmp;
  1191.     }
  1192.     tmp[numbytes]=0;
  1193.     return tmp;
  1194. }
  1195. forward GodTimer( playerid );
  1196. public GodTimer( playerid )
  1197. {
  1198.     if ( GetPVarInt( playerid, "God" ) == 0 ) KillTimer( God[ playerid ] );
  1199.     SetPlayerHealth( playerid, 999999999.0 );
  1200. }
  1201. forward CarGodTimer( playerid );
  1202. public CarGodTimer( playerid )
  1203. {
  1204.     if ( GetPVarInt( playerid, "CGod" ) == 0 ) KillTimer( CGod[ playerid ] );
  1205.     if ( IsPlayerInAnyVehicle( playerid ) == 1 )
  1206.     {
  1207.         RepairVehicle( GetPlayerVehicleID( playerid ) );
  1208.         SetVehicleHealth( GetPlayerVehicleID( playerid ), 9999.0 );
  1209.     }
  1210. }
  1211. forward TimeU();
  1212. public TimeU()
  1213. {
  1214.     new string[7];                              
  1215.     Tsec+=1;                                      
  1216.     if(Tsec==60) {                                
  1217.         Tsec=00;
  1218.         THrs+=1;                                
  1219.     }
  1220.     if(THrs==24) {                                
  1221.         Tsec=00;                                  
  1222.         THrs=0;                                  
  1223.     }
  1224.     if(Tsec<10) {                                
  1225.                                                
  1226.         format(string,sizeof(string),"%d:%d0",THrs,Tsec);
  1227.  
  1228.     }
  1229.     if(Tsec>10) {                                
  1230.                                                  
  1231.         format(string,sizeof(string),"%d:%d",THrs,Tsec);
  1232.  
  1233.     }
  1234.     if(THrs<10) {
  1235.                                                  
  1236.         format(string,sizeof(string),"0%d:%d",THrs,Tsec);
  1237.  
  1238.     }
  1239.     for(new i; i<MAX_PLAYERS; i++) {              
  1240.         if(IsPlayerConnected(i)) {                
  1241.             SetPlayerTime(i,THrs,Tsec);          
  1242.         }
  1243.     }
  1244.     TextDrawSetString(Servt,string);              
  1245.  
  1246. }
  1247.  
  1248. forward RandomWeather();
  1249. public RandomWeather()
  1250. {
  1251.             new Weather = random(46);
  1252.             SetWeather(Weather);
  1253.             switch(Weather)
  1254.             {
  1255.             case 0:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sunny Skies |[Visibility]:High |[Winds]:NA |[Clouds]:Moderate");
  1256.             case 1:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Moderate Sunny Skies [Visibility]:High [Winds]:NA [Clouds]:Moderate");
  1257.             case 2:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sunny Skies [Visibility]:High [Winds]:NA [Clouds]:Moderate");
  1258.             case 3:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sunny Skies [Visibility]:High [Winds]:NA [Clouds]:Moderate");
  1259.             case 4:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sunny Skies |[Visibility]:High |[Winds]:NA |[Clouds]:Moderate");
  1260.             case 5:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sunny Skies |[Visibility]:High |[Winds]:NA |[Clouds]:Moderate");
  1261.             case 7:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sunny Skies |[Visibility]:High |[Winds]:NA |[Clouds]:Moderate");
  1262.             case 8:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Wet Rainy Weather |[Visibility]:Medium |[Winds]:Moderate |[Clouds]:Heavy");
  1263.             case 9:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Thick Fog |[Visibility]:Low |[Winds]:Moderate |[Clouds]:Heavy");
  1264.             case 10:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Moderate Sunny Skies |[Visibility]:High |[Winds]:NA |[Clouds]:Moderate");
  1265.             case 11:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: HeatWave |[Visibility]:High |[Winds]:NA |[Clouds]:Moderate");
  1266.             case 12:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Hazy/Dull Weather |[Visibility]:Moderate |[Winds]:NA |[Clouds]:High");
  1267.             case 13:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Hazy/Dull Weather |[Visibility]:Moderate |[Winds]:NA |[Clouds]:High");
  1268.             case 14:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Hazy/Dull Weather |[Visibility]:Moderate |[Winds]:NA |[Clouds]:High");
  1269.             case 15:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Heavy RainStorm |[Visibility]:Low |[Winds]:Very High |[Clouds]: very Thick");
  1270.             case 16:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Scorching Hot Bright Weather |[Visibility]:High |[Winds]:NA |[Clouds]:Low");
  1271.             case 17:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Scorching Hot Bright Weather |[Visibility]:High |[Winds]:NA |[Clouds]:Low");
  1272.             case 18:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Scorching Hot Bright Weather |[Visibility]:High |[Winds]:NA |[Clouds]:Low");
  1273.             case 19:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Sand Storm |[Visibility]:Very-Low |[Winds]: High Speed Winds |[Clouds]:Heavy");
  1274.             case 20:SendClientMessageToAll(COL_LIGHTBLUE,"METAR INFO: [Current Weather]: Toxic Green Smog |[Visibility]:Low |[Winds]:Moderate |[Clouds]:Heavy");
  1275.  
  1276.  
  1277.             }
  1278. }
  1279. CMD:afk(playerid,params[])
  1280. {
  1281.     if(PlayerAFK[playerid] == 0)
  1282.     {
  1283.         new mName[MAX_PLAYER_NAME];
  1284.         GetPlayerName(playerid,mName,sizeof(mName));
  1285.         new string[120];
  1286.         format(string,sizeof(string),"%s(%d) is now AFK",mName,playerid);
  1287.         TogglePlayerControllable(playerid,0);
  1288.         PlayerAFK[playerid] = 1;
  1289.         SendClientMessageToAll(COLOR_WHITE,string);
  1290.     }
  1291.     if(PlayerAFK[playerid] == 1)
  1292.     {
  1293.         new mName[MAX_PLAYER_NAME];
  1294.         GetPlayerName(playerid,mName,sizeof(mName));
  1295.         new string[120];
  1296.         format(string,sizeof(string),"%s(%d) is now back!",mName,playerid);
  1297.         TogglePlayerControllable(playerid,1);
  1298.         SendClientMessageToAll(COLOR_WHITE,string);
  1299.         PlayerAFK[playerid] = 0;
  1300.     }
  1301.  
  1302.     return true;
  1303. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top