Advertisement
Guest User

lQs's Gamemode

a guest
Apr 27th, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 81.56 KB | None | 0 0
  1. //The Corners of Los Santos RPG
  2.  
  3. #include <a_samp>
  4. #include <sscanf2>
  5. #include <YSI\y_ini>
  6. #include <zcmd>
  7. #include <foreach>
  8. #include <streamer>
  9. #include <Dini>
  10. #include <basicssm>
  11.  
  12. #define WEAPON_PATH "Weapons"
  13. #define PATH "/Users/%s.ini"
  14. #define FILE_TABLICA "news.txt"
  15. #define NOTADMIN "You are not authorized to use this command!"
  16.  
  17. #define COL_WHITE "{FFFFFF}"
  18. #define COL_YELLOW "{F3FF02}"
  19. #define COL_RED "{F81414}"
  20.  
  21. #define ResetMoneyBar ResetPlayerMoney
  22. #define UpdateMoneyBar GivePlayerMoney
  23. #define SCM SendClientMessage
  24. #define COLOR_BITEM         0xE1B0B0FF
  25. #define COLOR_GRAD1         0xB4B5B7FF
  26. #define COLOR_GRAD2         0xBFC0C2FF
  27. #define COLOR_GRAD3         0xCBCCCEFF
  28. #define COLOR_GRAD4         0xD8D8D8FF
  29. #define COLOR_GRAD5         0xE3E3E3FF
  30. #define COLOR_GRAD6         0xF0F0F0FF
  31. #define COLOR_GREY          0xAFAFAFAA
  32. #define COLOR_GREEN         0x33AA33AA
  33. #define COLOR_RED           0xAA3333AA
  34. #define COLOR_BLACK         0x000001FF
  35. #define COLOR_BLUE          0x007BD0FF
  36. #define COLOR_LIGHTORANGE   0xFFA100FF
  37. #define COLOR_FLASH         0xFF000080
  38. #define COLOR_LIGHTRED      0xFF6347AA
  39. #define COLOR_LIGHTBLUE     0x33CCFFAA
  40. #define COLOR_LIGHTGREEN    0x9ACD32AA
  41. #define COLOR_YELLOW        0xFFFF00AA
  42. #define COLOR_LIGHTYELLOW   0xFFFF91FF
  43. #define COLOR_YELLOW2       0xF5DEB3AA
  44. #define COLOR_WHITE         0xFFFFFFAA
  45. #define COLOR_FADE1         0xE6E6E6E6
  46. #define COLOR_FADE2         0xC8C8C8C8
  47. #define COLOR_FADE3         0xAAAAAAAA
  48. #define COLOR_FADE4         0x8C8C8C8C
  49. #define COLOR_FADE5         0x6E6E6E6E
  50. #define COLOR_PURPLE        0xC2A2DAAA
  51. #define COLOR_DBLUE         0x2641FEAA
  52. #define COLOR_DOC           0xFF8282AA
  53. #define COLOR_DCHAT         0xF0CC00FF
  54. #define COLOR_NEWS          0xFFA500AA
  55. #define COLOR_OOC           0xE0FFFFAA
  56. #define TEAM_BLUE_COLOR     0x8D8DFF00
  57. #define TEAM_GROVE_COLOR    0x00AA00FF
  58. #define TEAM_AZTECAS_COLOR  0x01FCFFC8
  59. #define NEWBIE_COLOR        0x7DAEFFFF
  60. #define SAMP_COLOR          0xAAC4E5FF
  61. #define ResetMoneyBar ResetPlayerMoney
  62. #define UpdateMoneyBar GivePlayerMoney
  63. new Text:Textdraw0,
  64.     Text:Textdraw1,
  65.     Text:Textdraw2,
  66.     Text:Textdraw3,
  67.     Text:Textdraw4,
  68.     Text:Textdraw5,
  69.     Text:textdraw6;
  70.  
  71. forward Odswiez();
  72. public Odswiez()
  73. {
  74.     new tablica[466];
  75.     new File:Aktualnosci = fopen(""FILE_TABLICA"", io_read);
  76.     fread(Aktualnosci, tablica);
  77.     fclose(Aktualnosci);
  78.     TextDrawSetString(Textdraw1, tablica);
  79.     return 1;
  80. }
  81.  
  82. forward blood(playerid);
  83. public blood(playerid)
  84. {
  85.     new Float:HP;
  86.     GetPlayerHealth(playerid,HP);
  87.     if(HP <= 10)
  88.     {
  89.     GameTextForPlayer(playerid,"~w~You are injured!",2000,6);
  90.     TextDrawShowForPlayer(playerid,textdraw6);
  91.     }
  92.     else
  93.     {
  94.     TextDrawHideForPlayer(playerid,textdraw6);
  95.     }
  96. }
  97.  
  98. public MoneyTimer()
  99. {
  100.     new username[MAX_PLAYER_NAME];
  101.     for(new i=0; i<MAX_PLAYERS; i++)
  102.     {
  103.         if(IsPlayerConnected(i))
  104.         {
  105.             if(server_GetCash(i) != GetPlayerMoney(i))
  106.             {
  107.                 ResetMoneyBar(i);
  108.                 UpdateMoneyBar(i,server_GetCash(i));
  109.                 new hack = server_GetCash(i) - server_GetCash(i);
  110.                 GetPlayerName(i,username,sizeof(username));
  111.             }
  112.         }
  113.     }
  114. }
  115.  
  116. new bool:AlreadyGiveWeapons[MAX_PLAYERS];
  117. SaveWeaponsToFile(playerid)
  118. {
  119.     new i, path[50], string[128], weaponid, ammo;
  120.     path = GetPlayerFormattedName(playerid);
  121.     if (!dini_Exists(path)) dini_Create(path);
  122.     for (i=0; i<13; i++)
  123.     {
  124.         GetPlayerWeaponData(playerid,i,weaponid,ammo);
  125.         format(string,sizeof(string),"Weapon - %d",i);
  126.         dini_IntSet(path,string,weaponid);
  127.         format(string,sizeof(string),"AmmoID - %d",i);
  128.         dini_IntSet(path,string,ammo == 65535 ? 0 : ammo);
  129.     }
  130. }
  131.  
  132. forward LoadWeaponsToFile(playerid);
  133. public LoadWeaponsToFile(playerid)
  134. {
  135.     new i, path[50], string[128], weaponid, ammo;
  136.     path = GetPlayerFormattedName(playerid);
  137.     ResetPlayerWeapons(playerid);
  138.     for (i=0; i<13; i++)
  139.     {
  140.         format(string,sizeof(string),"Weapon - %d",i);
  141.         weaponid = dini_Int(path,string);
  142.         format(string,sizeof(string),"AmmoID - %d",i);
  143.         ammo = dini_Int(path,string);
  144.         GivePlayerWeapon(playerid,weaponid,ammo);
  145.     }
  146.     AlreadyGiveWeapons[playerid] = true;
  147. }
  148.  
  149. GetPlayerFormattedName(playerid)
  150. {
  151.     new name[24], full[50];
  152.     GetPlayerName(playerid,name,sizeof(name));
  153.     format(full,sizeof(full),"%s/%s.txt",WEAPON_PATH,name);
  154.     return full;
  155. }
  156.  
  157. forward payday(playerid);
  158. public payday(playerid)
  159. {
  160.     new hh, mm, ss;
  161.     gettime( hh, mm, ss );
  162.  
  163.     if( mm == 0 )
  164.     {
  165.         for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
  166.         {
  167.             new string[128];
  168.             new RandomPay = random(1000 - 400) + 100;// new RandomPay = random(MAX - MIN) + MIN;
  169.             server_GiveCash( playerid, RandomPay );
  170.             SendClientMessage(playerid, COLOR_WHITE,"---PAYCHECK---");
  171.             format(string, sizeof(string), "Your earnings: $%i", RandomPay);
  172.             SendClientMessage(i, COLOR_WHITE, string);
  173.             SendClientMessage(playerid, COLOR_WHITE,"-------------------------");
  174.         }
  175.     }
  176.     return 1;
  177. }
  178.  
  179.  
  180.  
  181. //Fowards
  182. forward split(const strsrc[], strdest[][], delimiter);
  183. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  184. forward ProxDetectorS(Float:radi, playerid, targetid);
  185. forward LoadUser_data(playerid,name[],value[]);
  186. forward SaveAccountInfo(playerid);
  187. forward OOCOff(color,const string[]);
  188. forward FixHour(hour);
  189. forward IsValidName(playerid);
  190.  
  191. //Forwarded Logs
  192. forward PayLog(string[]);
  193. forward BanLog(string[]);
  194. forward KickLog(string[]);
  195. //-------------------------------------
  196. //Variables
  197. new gPlayerLogged[MAX_PLAYERS char];
  198. new gAdminAuthorized[MAX_PLAYERS];
  199. new gOOC[MAX_PLAYERS];
  200. new HidePM[MAX_PLAYERS];
  201. new PayWarn[MAX_PLAYERS][MAX_PLAYERS];
  202.  
  203. new noooc = 0;
  204. new realchat = 1;
  205. new timeshift = -1;
  206. new shifthour;
  207. //-----------------------------
  208.  
  209. enum pInfo
  210. {
  211.     pPass,
  212.     pCash,
  213.     pSkin,
  214.     pLevel,
  215.     pInt,
  216.     pVW,
  217.     pAdmin,
  218.     pSecKey,
  219.     pKills,
  220.     pDeaths,
  221.     Float:pFacingAngle,
  222.     Float:pHealth,
  223.     Float:pArmour,
  224.     Float:pLastX,
  225.     Float:pLastY,
  226.     Float:pLastZ
  227. }
  228. new PlayerInfo[MAX_PLAYERS][pInfo];
  229.  
  230. //Fowarded Public Functions
  231. public PayLog(string[])
  232. {
  233.     new entry[256];
  234.     format(entry, sizeof(entry), "%s\n",string);
  235.     new File:hFile;
  236.     hFile = fopen("pay.log", io_append);
  237.     fwrite(hFile, entry);
  238.     fclose(hFile);
  239. }
  240.  
  241. public KickLog(string[])
  242. {
  243.     new entry[256];
  244.     format(entry, sizeof(entry), "%s\n",string);
  245.     new File:hFile;
  246.     hFile = fopen("kick.log", io_append);
  247.     fwrite(hFile, entry);
  248.     fclose(hFile);
  249. }
  250.  
  251. public BanLog(string[])
  252. {
  253.     new entry[256];
  254.     format(entry, sizeof(entry), "%s\n",string);
  255.     new File:hFile;
  256.     hFile = fopen("ban.log", io_append);
  257.     fwrite(hFile, entry);
  258.     fclose(hFile);
  259. }
  260.  
  261. public IsValidName(playerid)
  262. {
  263.     new pname[MAX_PLAYER_NAME],underline=0;
  264.     GetPlayerName(playerid, pname, sizeof(pname));
  265.     if(strfind(pname,"[",true) != (-1)) return 0;
  266.     else if(strfind(pname,".",true) != (-1)) return 0;
  267.     else if(strfind(pname,"]",true) != (-1)) return 0;
  268.     else if(strfind(pname,"$",true) != (-1)) return 0;
  269.     else if(strfind(pname,"(",true) != (-1)) return 0;
  270.     else if(strfind(pname,")",true) != (-1)) return 0;
  271.     else if(strfind(pname,"=",true) != (-1)) return 0;
  272.     else if(strfind(pname,"@",true) != (-1)) return 0;
  273.     else if(strfind(pname,"1",true) != (-1)) return 0;
  274.     else if(strfind(pname,"2",true) != (-1)) return 0;
  275.     else if(strfind(pname,"3",true) != (-1)) return 0;
  276.     else if(strfind(pname,"4",true) != (-1)) return 0;
  277.     else if(strfind(pname,"5",true) != (-1)) return 0;
  278.     else if(strfind(pname,"6",true) != (-1)) return 0;
  279.     else if(strfind(pname,"7",true) != (-1)) return 0;
  280.     else if(strfind(pname,"8",true) != (-1)) return 0;
  281.     else if(strfind(pname,"9",true) != (-1)) return 0;
  282.     new maxname = strlen(pname);
  283.     for(new i=0; i<maxname; i++) { if(pname[i] == '_') underline ++; }
  284.     if(underline != 1) return 0;
  285.     pname[0] = toupper(pname[0]);
  286.     for(new x=1; x<maxname; x++)
  287.     {
  288.         if(pname[x] == '_') pname[x+1] = toupper(pname[x+1]);
  289.         else if(pname[x] != '_' && pname[x-1] != '_') pname[x] = tolower(pname[x]);
  290.     }
  291.     return 1;
  292. }
  293.  
  294. public ProxDetectorS(Float:radi, playerid, targetid)
  295. {
  296.     if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  297.     {
  298.         new Float:posx, Float:posy, Float:posz;
  299.         new Float:oldposx, Float:oldposy, Float:oldposz;
  300.         new Float:tempposx, Float:tempposy, Float:tempposz;
  301.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  302.         GetPlayerPos(targetid, posx, posy, posz);
  303.         tempposx = (oldposx -posx);
  304.         tempposy = (oldposy -posy);
  305.         tempposz = (oldposz -posz);
  306.         if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  307.         {
  308.             return 1;
  309.         }
  310.     }
  311.     return 0;
  312. }
  313.  
  314. public FixHour(hour)
  315. {
  316.     hour = timeshift+hour;
  317.     if(hour < 0) { hour = hour+24; }
  318.     else if(hour > 23) { hour = hour-24; }
  319.     shifthour = hour;
  320.     return 1;
  321. }
  322.  
  323.  
  324. public OOCOff(color,const string[])
  325. {
  326.     for(new i = 0; i < MAX_PLAYERS; i++)
  327.     {
  328.         if(IsPlayerConnected(i))
  329.         {
  330.             if(!gOOC[i])
  331.             {
  332.                 SendClientMessage(i, color, string);
  333.             }
  334.         }
  335.     }
  336. }
  337.  
  338. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  339. {
  340.     if(IsPlayerConnected(playerid))
  341.     {
  342.         new Float:posx, Float:posy, Float:posz;
  343.         new Float:oldposx, Float:oldposy, Float:oldposz;
  344.         new Float:tempposx, Float:tempposy, Float:tempposz;
  345.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  346.         for(new i = 0; i < MAX_PLAYERS; i++)
  347.         {
  348.             if(IsPlayerConnected(i))
  349.             {
  350.                 GetPlayerPos(i, posx, posy, posz);
  351.                 tempposx = (oldposx -posx);
  352.                 tempposy = (oldposy -posy);
  353.                 tempposz = (oldposz -posz);
  354.                 new playerworld, player2world;
  355.                 playerworld = GetPlayerVirtualWorld(playerid);
  356.                 player2world = GetPlayerVirtualWorld(i);
  357.                 if(playerworld == player2world)
  358.                 {
  359.                     if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  360.                     {
  361.                         SendClientMessage(i, col1, string);
  362.                     }
  363.                     else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  364.                     {
  365.                         SendClientMessage(i, col2, string);
  366.                     }
  367.                     else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  368.                     {
  369.                         SendClientMessage(i, col3, string);
  370.                     }
  371.                     else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  372.                     {
  373.                         SendClientMessage(i, col4, string);
  374.                     }
  375.                     else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  376.                     {
  377.                         SendClientMessage(i, col5, string);
  378.                     }
  379.                 }
  380.                 else
  381.                 {
  382.                     SendClientMessage(i, col1, string);
  383.                 }
  384.             }
  385.         }
  386.     }
  387.     return 1;
  388. }
  389.  
  390. public SaveAccountInfo(playerid)
  391. {
  392.     new cash = server_GetCash(playerid);
  393.     new skin = GetPlayerSkin(playerid);
  394.     new level = GetPlayerScore(playerid);
  395.     new int = GetPlayerInterior(playerid);
  396.     new vw = GetPlayerVirtualWorld(playerid);
  397.     new Float:X, Float:Y, Float:Z;
  398.     new Float:facingangle;
  399.     new Float:health, Float:armour;
  400.     GetPlayerHealth(playerid, health);
  401.     GetPlayerArmour(playerid, armour);
  402.     GetPlayerFacingAngle(playerid, facingangle);
  403.     GetPlayerPos(playerid, X, Y, Z);
  404.     new INI:File = INI_Open(UserPath(playerid));
  405.     INI_SetTag(File,"data");
  406.     INI_WriteInt(File,"Cash",cash);
  407.     INI_WriteInt(File,"Skin",skin);
  408.     INI_WriteInt(File,"Level",level);
  409.     INI_WriteInt(File,"Int",int);
  410.     INI_WriteInt(File,"VW",vw);
  411.     INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  412.     INI_WriteInt(File,"SecKey",PlayerInfo[playerid][pSecKey]);
  413.     INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  414.     INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  415.     INI_WriteFloat(File, "FacingAngle", facingangle);
  416.     INI_WriteFloat(File, "Health", health);
  417.     INI_WriteFloat(File, "Armour", armour);
  418.     INI_WriteFloat(File, "LastX", X);
  419.     INI_WriteFloat(File, "LastY", Y);
  420.     INI_WriteFloat(File, "LastZ", Z);
  421.     INI_Close(File);
  422.     return 1;
  423. }
  424.  
  425. public LoadUser_data(playerid,name[],value[])
  426. {
  427.     INI_Int("Password",PlayerInfo[playerid][pPass]);
  428.     INI_Int("Cash",PlayerInfo[playerid][pCash]);
  429.     INI_Int("Skin",PlayerInfo[playerid][pSkin]);
  430.     INI_Int("Level",PlayerInfo[playerid][pLevel]);
  431.     INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  432.     INI_Int("SecKey",PlayerInfo[playerid][pSecKey]);
  433.     INI_Int("Kills",PlayerInfo[playerid][pKills]);
  434.     INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  435.     INI_Float("FacingAngle",PlayerInfo[playerid][pFacingAngle]);
  436.     INI_Float("Health",PlayerInfo[playerid][pHealth]);
  437.     INI_Float("Armour",PlayerInfo[playerid][pArmour]);
  438.     INI_Float("LastX", PlayerInfo[playerid][pLastX]);
  439.     INI_Float("LastY", PlayerInfo[playerid][pLastY]);
  440.     INI_Float("LastZ", PlayerInfo[playerid][pLastZ]);
  441.     return 1;
  442. }
  443.  
  444. public split(const strsrc[], strdest[][], delimiter)
  445. {
  446.     new i, li;
  447.     new aNum;
  448.     new len;
  449.     while(i <= strlen(strsrc)){
  450.         if(strsrc[i]==delimiter || i==strlen(strsrc)){
  451.             len = strmid(strdest[aNum], strsrc, li, i, 128);
  452.             strdest[aNum][len] = 0;
  453.             li = i+1;
  454.             aNum++;
  455.         }
  456.         i++;
  457.     }
  458.     return 1;
  459. }
  460.  
  461. //STOCKS
  462. stock ABroadCast(color,string[],level)
  463. {
  464.     foreach(Player, i)
  465.     {
  466.         if (PlayerInfo[i][pAdmin] >= level)
  467.         {
  468.             SendClientMessage(i, color, string);
  469.             printf("%s", string);
  470.         }
  471.     }
  472.     return 1;
  473. }
  474.  
  475.  
  476. stock GetPlayerFirstName(playerid)
  477. {
  478.     new namestring[2][MAX_PLAYER_NAME];
  479.     new name[MAX_PLAYER_NAME];
  480.     GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  481.     split(name, namestring, '_');
  482.     return namestring[0];
  483. }
  484.  
  485. stock UserPath(playerid)
  486. {
  487.     new string[128],playername[MAX_PLAYER_NAME];
  488.     GetPlayerName(playerid,playername,sizeof(playername));
  489.     format(string,sizeof(string),PATH,playername);
  490.     return string;
  491. }
  492.  
  493. stock udb_hash(buf[]) {
  494.     new length=strlen(buf);
  495.     new s1 = 1;
  496.     new s2 = 0;
  497.     new n;
  498.     for (n=0; n<length; n++)
  499.     {
  500.         s1 = (s1 + buf[n]) % 65521;
  501.         s2 = (s2 + s1)     % 65521;
  502.     }
  503.     return (s2 << 16) + s1;
  504. }
  505.  
  506. stock strreplace(string[], find, replace)
  507. {
  508.     for(new i=0; string[i]; i++)
  509.     {
  510.         if(string[i] == find)
  511.         {
  512.             string[i] = replace;
  513.         }
  514.     }
  515. }
  516.  
  517. stock GetName(playerid)
  518. {
  519.     new
  520.     name[24];
  521.     GetPlayerName(playerid, name, sizeof(name));
  522.     strreplace(name, '_', ' ');
  523.     return name;
  524. }
  525. //--------------------------------------------------
  526.  
  527. main()
  528. {
  529.     print("\n----------------------------------");
  530.     print("* TCoLS Roleplay load sucessfully....");
  531.     print("----------------------------------\n");
  532. }
  533.  
  534. public OnGameModeInit()
  535. {
  536.     ManualVehicleEngineAndLights();
  537.     SetTimer("payday", 60000, 1);
  538.     SetTimer("MoneyTimer", 1000, 1);
  539.     SetGameModeText("TCoLS RPG v1.1");
  540.     SetNameTagDrawDistance(10.0);
  541.     AllowInteriorWeapons(1);
  542.     ShowPlayerMarkers(0);
  543.     EnableStuntBonusForAll(0);
  544.     DisableInteriorEnterExits();
  545.     AddPlayerClass(24, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  546.     AddPlayerClass(25, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  547.     AddPlayerClass(105, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  548.     AddPlayerClass(106, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  549.     AddPlayerClass(104, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  550.     AddPlayerClass(107, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  551.     AddPlayerClass(108, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  552.     AddPlayerClass(102, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  553.     AddPlayerClass(103, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  554.     AddPlayerClass(110, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  555.     AddPlayerClass(111, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  556.     AddPlayerClass(5, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  557.     AddPlayerClass(173, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  558.     AddPlayerClass(174, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  559.     AddPlayerClass(270, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  560.     AddPlayerClass(271, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  561.     AddPlayerClass(292, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
  562.     // Bloodtextdraw
  563.     textdraw6 = TextDrawCreate(306.000000, -2.000000, ".");
  564.     TextDrawAlignment(textdraw6, 2);
  565.     TextDrawBackgroundColor(textdraw6, 255);
  566.     TextDrawFont(textdraw6, 1);
  567.     TextDrawLetterSize(textdraw6, 0.889999, 51.199993);
  568.     TextDrawColor(textdraw6, -1);
  569.     TextDrawSetOutline(textdraw6, 0);
  570.     TextDrawSetProportional(textdraw6, 1);
  571.     TextDrawSetShadow(textdraw6, 1);
  572.     TextDrawUseBox(textdraw6, 1);
  573.     TextDrawBoxColor(textdraw6, -1207959526);
  574.     TextDrawTextSize(textdraw6, 29.000000, 664.000000);
  575.     // Tablica
  576.     Textdraw0 = TextDrawCreate(511.000000,211.000000,"News:");
  577.     Textdraw1 = TextDrawCreate(497.000000,228.000000,"Loaded");
  578.     Textdraw2 = TextDrawCreate(636.000000,227.000000,"_");
  579.     Textdraw3 = TextDrawCreate(641.000000,212.000000,"_");
  580.     Textdraw4 = TextDrawCreate(495.000000,218.000000,"~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~-");
  581.     Textdraw5 = TextDrawCreate(641.000000,316.000000,"_");
  582.     TextDrawUseBox(Textdraw2,1);
  583.     TextDrawBoxColor(Textdraw2,0x00000033);
  584.     TextDrawTextSize(Textdraw2,492.000000,22.000000);
  585.     TextDrawUseBox(Textdraw3,1);
  586.     TextDrawBoxColor(Textdraw3,0x00000033);
  587.     TextDrawTextSize(Textdraw3,486.000000,-1.000000);
  588.     TextDrawUseBox(Textdraw5,1);
  589.     TextDrawBoxColor(Textdraw5,0x00000033);
  590.     TextDrawTextSize(Textdraw5,487.000000,0.000000);
  591.     TextDrawAlignment(Textdraw0,0);
  592.     TextDrawAlignment(Textdraw1,0);
  593.     TextDrawAlignment(Textdraw2,0);
  594.     TextDrawAlignment(Textdraw3,0);
  595.     TextDrawAlignment(Textdraw4,0);
  596.     TextDrawAlignment(Textdraw5,0);
  597.     TextDrawBackgroundColor(Textdraw0,0x00000033);
  598.     TextDrawBackgroundColor(Textdraw1,0x000000ff);
  599.     TextDrawBackgroundColor(Textdraw2,0x000000ff);
  600.     TextDrawBackgroundColor(Textdraw3,0x000000ff);
  601.     TextDrawBackgroundColor(Textdraw4,0x000000ff);
  602.     TextDrawBackgroundColor(Textdraw5,0x000000ff);
  603.     TextDrawFont(Textdraw0,1);
  604.     TextDrawLetterSize(Textdraw0,0.699999,1.000000);
  605.     TextDrawFont(Textdraw1,1);
  606.     TextDrawLetterSize(Textdraw1,0.199999,1.000000);
  607.     TextDrawFont(Textdraw2,3);
  608.     TextDrawLetterSize(Textdraw2,1.000000,9.400001);
  609.     TextDrawFont(Textdraw3,3);
  610.     TextDrawLetterSize(Textdraw3,1.000000,1.200000);
  611.     TextDrawFont(Textdraw4,3);
  612.     TextDrawLetterSize(Textdraw4,0.199999,1.200000);
  613.     TextDrawFont(Textdraw5,3);
  614.     TextDrawLetterSize(Textdraw5,1.000000,1.000000);
  615.     TextDrawColor(Textdraw0,0xffff00ff);
  616.     TextDrawColor(Textdraw1,0xffffffff);
  617.     TextDrawColor(Textdraw2,0xffffffff);
  618.     TextDrawColor(Textdraw3,0xffffffff);
  619.     TextDrawColor(Textdraw4,0xffffffff);
  620.     TextDrawColor(Textdraw5,0xffffffff);
  621.     TextDrawSetOutline(Textdraw0,1);
  622.     TextDrawSetOutline(Textdraw1,1);
  623.     TextDrawSetOutline(Textdraw2,1);
  624.     TextDrawSetOutline(Textdraw3,1);
  625.     TextDrawSetOutline(Textdraw4,1);
  626.     TextDrawSetOutline(Textdraw5,1);
  627.     TextDrawSetProportional(Textdraw0,1);
  628.     TextDrawSetProportional(Textdraw1,1);
  629.     TextDrawSetProportional(Textdraw2,1);
  630.     TextDrawSetProportional(Textdraw3,1);
  631.     TextDrawSetProportional(Textdraw4,1);
  632.     TextDrawSetProportional(Textdraw5,1);
  633.     TextDrawSetShadow(Textdraw0,1);
  634.     TextDrawSetShadow(Textdraw1,1);
  635.     TextDrawSetShadow(Textdraw2,1);
  636.     TextDrawSetShadow(Textdraw3,1);
  637.     TextDrawSetShadow(Textdraw4,1);
  638.     TextDrawSetShadow(Textdraw5,1);
  639.  
  640.     new tablica[466];
  641.     new File:Aktualnosci = fopen(""FILE_TABLICA"", io_read);
  642.     fread(Aktualnosci, tablica);
  643.     fclose(Aktualnosci);
  644.     TextDrawSetString(Textdraw1, tablica);
  645.  
  646.     SetTimer("Odswiez", 6000, true);
  647.     //3DTEXTS
  648.     Create3DTextLabel("Trucker Job\nEnter the truck and /petrol.", COLOR_WHITE, 2070.7717, -1939.3361, 13.5469, 40, 0); //trucker
  649.     Create3DTextLabel("Courier Job\nEnter the truck and /courier.", COLOR_WHITE, 1615.8240, -1842.1359, 13.5307, 40, 0); //courier
  650.     Create3DTextLabel("Pizza Boy Job\nEnter the pizzaboy and /pizza.", COLOR_WHITE, 2113.8711, -1786.4855, 13.5608, 40, 0); //pizzaboy
  651.     Create3DTextLabel("Sweeper Job\nEnter the sweeper and /sweeper.", COLOR_WHITE, 1434.9597, -1845.5957, 13.5469, 40, 0); //sweeper
  652.     Create3DTextLabel("Farmer Job\nEnter the harvester and /harvest.", COLOR_WHITE, -481.2557, -1458.7404, 15.3066, 40, 0); //farmer
  653.     //OBJECTS
  654.     CreateObject(11674,2497.76367188,-1759.74609375,12.43701935,0.00000000,0.00000000,218.49609375); //object(des_cluckin) (1)
  655.     CreateObject(1280,2499.74365234,-1751.33862305,12.84823227,0.00000000,0.00000000,270.25000000); //object(parkbench1) (2)
  656.     CreateObject(640,2487.71337891,-1753.13659668,13.39390659,0.00000000,0.00000000,180.00000000); //object(kb_planter_bush2) (1)
  657.     CreateObject(640,2487.68530273,-1748.09777832,13.39390659,0.00000000,0.00000000,179.99450684); //object(kb_planter_bush2) (2)
  658.     CreateObject(1280,2503.14257812,-1751.29687500,12.84823227,0.00000000,0.00000000,270.24719238); //object(parkbench1) (3)
  659.     CreateObject(1280,2496.34277344,-1751.36230469,12.84823227,0.00000000,0.00000000,270.24719238); //object(parkbench1) (4)
  660.     CreateObject(1496,2497.55639648,-1752.12719727,12.49540615,0.00000000,0.00000000,269.75000000); //object(gen_doorshop02) (1)
  661.     CreateObject(1496,2497.54321289,-1755.11230469,12.49540615,0.00000000,0.00000000,89.74731445); //object(gen_doorshop02) (2)
  662.     CreateObject(3005,2505.81103516,-1750.53759766,12.54650497,0.00000000,0.00000000,0.00000000); //object(smash_box_stay) (1)
  663.     CreateObject(3006,2505.81054688,-1750.53710938,12.52446461,0.00000000,0.00000000,0.00000000); //object(smash_box_brk) (2)
  664.     CreateObject(2968,2506.58520508,-1749.65698242,12.87935925,0.00000000,0.00000000,149.99633789); //object(cm_box) (3)
  665.     CreateObject(1409,2488.86254883,-1754.46362305,12.54687500,0.00000000,0.00000000,1.50000000); //object(cj_dump1_low) (1)
  666.     CreateObject(2670,2503.93847656,-1750.41503906,12.47486496,0.00000000,0.00000000,0.00000000); //object(proc_rubbish_1) (1)
  667.     CreateObject(2670,2489.17919922,-1753.72814941,12.54986763,0.75000000,0.00000000,332.00000000); //object(proc_rubbish_1) (2)
  668.     CreateObject(2673,2498.14965820,-1751.66198730,12.47064018,0.00000000,0.00000000,146.00000000); //object(proc_rubbish_5) (1)
  669.     CreateObject(2675,2488.04492188,-1754.71838379,12.48614597,0.00000000,0.00000000,152.00000000); //object(proc_rubbish_6) (1)
  670.     CreateObject(1449,2488.96826172,-1747.88391113,12.90446663,316.00219727,0.69506836,91.73284912); //object(dyn_crate_2) (1)
  671.     CreateObject(1449,2489.17529297,-1748.03393555,12.45446587,285.03027344,3.85873413,94.97570801); //object(dyn_crate_2) (2)
  672.     CreateObject(1450,2486.16650391,-1745.85473633,12.77170277,351.49804688,0.50341797,273.82397461); //object(dyn_crate_3) (2)
  673.     CreateObject(2770,2494.37597656,-1754.60241699,13.09481144,0.00000000,0.00000000,293.50000000); //object(cj_cb_bin) (2)
  674.     CreateObject(2601,2488.87280273,-1754.46484375,13.73025417,0.00000000,0.00000000,262.00000000); //object(cj_juice_can) (1)
  675.     CreateObject(1492,2494.98608398,-1752.80114746,12.38281250,0.00000000,0.00000000,270.00000000); //object(gen_doorint02) (1)
  676.     CreateObject(1230,2488.88330078,-1746.21520996,12.80175495,0.00000000,0.00000000,92.00000000); //object(cardboardbox) (1)
  677.     CreateObject(3119,2488.01562500,-1744.49682617,12.68667030,0.00000000,0.00000000,185.75000000); //object(cs_ry_props) (1)
  678.     CreateObject(16096,2491.14013672,-1757.83105469,14.28713799,0.00000000,0.00000000,0.00000000); //object(des_a51guardbox04) (1)
  679.     //Pizza Stack Idlewood//
  680.     CreateObject(1319,1937.1999500,-2145.1999500,-8.5000000,0.0000000,0.0000000,0.0000000); //object(ws_ref_bollard) (10)
  681.     CreateObject(2957,2128.6999500,-1781.5000000,14.0000000,0.0000000,0.0000000,90.0000000); //object(chinatgaragedoor) (1)
  682.     CreateObject(1616,2128.6999500,-1785.0000000,16.4000000,0.0000000,0.0000000,0.0000000); //object(nt_securecam1_01) (2)
  683.     CreateObject(983,2123.6999500,-1769.5000000,13.1000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (1)
  684.     CreateObject(983,2123.6999500,-1775.9000200,13.1000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (2)
  685.     CreateObject(983,2120.3999000,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (3)
  686.     CreateObject(983,2114.0000000,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (4)
  687.     CreateObject(983,2107.6001000,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (5)
  688.     CreateObject(983,2101.1999500,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (6)
  689.     CreateObject(994,2092.6001000,-1791.0999800,12.4000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (1)
  690.     CreateObject(994,2099.1999500,-1819.9000200,12.4000000,0.0000000,0.0000000,90.0000000); //object(lhouse_barrier2) (2)
  691.     CreateObject(994,2092.1999500,-1811.6999500,12.5000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (3)
  692.     CreateObject(994,2092.5000000,-1802.2998000,12.4000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (4)
  693.     CreateObject(994,2092.1999500,-1822.3000500,12.4000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (5)
  694.     CreateObject(994,2099.0000000,-1799.8994100,12.4000000,0.0000000,0.0000000,90.0000000); //object(lhouse_barrier2) (6)
  695.     CreateObject(983,2123.6999500,-1763.0999800,13.1000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (7)
  696.     CreateObject(3260,2105.5000000,-1823.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (1)
  697.     CreateObject(3260,2105.5000000,-1825.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (2)
  698.     CreateObject(3260,2105.5000000,-1827.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (3)
  699.     CreateObject(3260,2105.5000000,-1829.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (4)
  700.     CreateObject(3260,2105.5000000,-1830.9000200,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (5)
  701.     CreateObject(3260,2128.6001000,-1787.0000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (6)
  702.     CreateObject(3260,2128.6001000,-1789.0000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (7)
  703.     CreateObject(3260,2128.6001000,-1791.0000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (8)
  704.     CreateObject(3260,2127.6001000,-1792.0000000,13.6000000,0.0000000,0.0000000,180.0000000); //object(oldwoodpanel) (9)
  705.     CreateObject(3260,2125.6001000,-1792.0000000,13.6000000,0.0000000,0.0000000,179.9950000); //object(oldwoodpanel) (10)
  706.     CreateObject(3260,2123.6001000,-1792.0000000,13.6000000,0.0000000,0.0000000,179.9950000); //object(oldwoodpanel) (11)
  707.     //Jefferson Center
  708.     CreateDynamicObject(1764,2303.8000488,-1433.9000244,23.0000000,0.0000000,0.0000000,0.0000000); //
  709.     CreateDynamicObject(1754,2306.3999023,-1434.6999512,23.0000000,0.0000000,0.0000000,320.0000000); //
  710.     CreateDynamicObject(1765,2302.6999512,-1436.8000488,23.0000000,0.0000000,0.0000000,120.0000000); //
  711.     CreateDynamicObject(2291,2306.1999512,-1436.6999512,23.0000000,0.0000000,0.0000000,200.0000000); //
  712.     CreateDynamicObject(1666,2305.3000488,-1435.8000488,23.6000004,0.0000000,0.0000000,0.0000000); //
  713.     CreateDynamicObject(1666,2303.3999023,-1435.8000488,23.6000004,0.0000000,0.0000000,0.0000000); //
  714.     CreateDynamicObject(1666,2305.1000977,-1435.0999756,23.6000004,0.0000000,0.0000000,0.0000000); //
  715.     CreateDynamicObject(1544,2305.3000488,-1435.5000000,23.5000000,0.0000000,0.0000000,0.0000000); //
  716.     CreateDynamicObject(1544,2303.6000977,-1434.5999756,23.0000000,90.0000000,35.0000000,0.0000000); //
  717.     CreateDynamicObject(1543,2304.1000977,-1435.1999512,23.5000000,0.0000000,0.0000000,0.0000000); //
  718.     CreateDynamicObject(1485,2304.0000000,-1435.0999756,23.5000000,0.0000000,0.0000000,0.0000000); //
  719.     CreateDynamicObject(1485,2303.5000000,-1435.6999512,23.5000000,0.0000000,0.0000000,265.0000000); //
  720.     CreateDynamicObject(1485,2305.3999023,-1435.9000244,23.5000000,0.0000000,0.0000000,170.0000000); //
  721.     CreateDynamicObject(916,2302.3999023,-1434.0000000,23.1000004,0.0000000,0.0000000,0.0000000); //
  722.     CreateDynamicObject(916,2301.5000000,-1434.0999756,23.1000004,0.0000000,0.0000000,35.0000000); //
  723.     CreateDynamicObject(928,2301.3000488,-1433.5999756,23.2999992,0.0000000,0.0000000,0.0000000); //
  724.     CreateDynamicObject(928,2300.6000977,-1432.9000244,23.2999992,0.0000000,0.0000000,72.0000000); //
  725.     CreateDynamicObject(2670,2307.3000488,-1435.5000000,23.1000004,0.0000000,0.0000000,90.0000000); //
  726.     CreateDynamicObject(2670,2313.8000488,-1438.6999512,20.2999992,0.0000000,0.0000000,50.0000000); //
  727.     CreateDynamicObject(2670,2314.1999512,-1436.8000488,20.5000000,0.0000000,0.0000000,0.0000000); //
  728.     CreateDynamicObject(2670,2315.1000977,-1438.9000244,20.2999992,0.0000000,0.0000000,0.0000000); //
  729.     CreateDynamicObject(2670,2314.6000977,-1437.9000244,20.1000004,0.0000000,0.0000000,0.0000000); //
  730.     CreateDynamicObject(1510,2303.5000000,-1435.5000000,23.5100002,0.0000000,0.0000000,0.0000000); //
  731.     CreateDynamicObject(2663,2304.3999023,-1435.8000488,23.7999992,0.0000000,0.0000000,0.0000000); //
  732.     CreateDynamicObject(2647,2304.0000000,-1435.8000488,23.7000008,0.0000000,0.0000000,0.0000000); //
  733.     CreateDynamicObject(2647,2302.5000000,-1434.1999512,23.2999992,0.0000000,358.0000000,0.0000000); //
  734.     CreateDynamicObject(2702,2302.1000977,-1434.0999756,23.1000004,0.0000000,0.0000000,0.0000000); //
  735.     CreateDynamicObject(2703,2302.1999512,-1434.1999512,23.2999992,95.0000000,0.0000000,0.0000000); //
  736.     CreateDynamicObject(2769,2305.1999512,-1435.1999512,23.5000000,0.0000000,0.0000000,50.0000000); //
  737.     CreateDynamicObject(2840,2301.5000000,-1434.1000977,23.0000000,0.0000000,0.0000000,0.0000000); //
  738.     CreateDynamicObject(2311,2303.6000977,-1435.5000000,23.0000000,0.0000000,0.0000000,0.0000000); //
  739.     CreateDynamicObject(983,2298.5000000,-1439.0000000,23.7000008,0.0000000,0.0000000,0.0000000); //
  740.     CreateDynamicObject(983,2298.5000000,-1434.1992188,23.7000008,0.0000000,0.0000000,0.0000000); //
  741.     CreateDynamicObject(983,2304.8999023,-1442.1999512,23.7000008,0.0000000,0.0000000,90.0000000); //
  742.     CreateDynamicObject(983,2301.6992188,-1442.1992188,23.7000008,0.0000000,0.0000000,90.0000000); //
  743.     CreateDynamicObject(3065,2300.6999512,-1441.4000244,23.1000004,0.0000000,0.0000000,0.0000000); //
  744.     CreateDynamicObject(1985,2300.1999512,-1439.6999512,26.0000000,0.0000000,357.9949951,0.0000000); //
  745.     CreateDynamicObject(946,2300.1000977,-1440.5000000,25.2000008,0.0000000,0.0000000,270.0000000); //
  746.     CreateDynamicObject(4227,2352.3999023,-1437.3000488,25.5000000,0.0000000,0.0000000,270.0000000); //
  747.     CreateDynamicObject(1473,2310.8999023,-1439.0000000,22.9400005,0.0000000,0.0000000,104.9999695); //
  748.     CreateDynamicObject(1472,2314.3999023,-1438.0999756,21.5000000,0.0000000,0.0000000,104.9999695); //
  749.     CreateDynamicObject(1474,2312.3999023,-1438.5860596,21.2500000,0.0000000,0.0000000,106.0000000); //
  750.     CreateDynamicObject(1470,2316.3000488,-1437.8000488,20.7999992,0.0000000,0.0000000,14.0000000); //
  751.     CreateDynamicObject(1337,2314.6999512,-1439.1999512,20.5000000,90.0000000,0.0000000,45.0000000); //
  752.     CreateDynamicObject(2102,2300.6999512,-1437.0899658,23.8299999,0.0000000,0.0000000,86.0000000); //
  753.     CreateDynamicObject(2629,2304.3994141,-1440.8994141,23.0000000,0.0000000,0.0000000,177.9949951); //
  754.     CreateDynamicObject(1481,2299.6000977,-1437.4000244,23.7000008,0.0000000,0.0000000,90.0000000); //
  755.     CreateDynamicObject(1481,2300.0000000,-1436.0999756,23.7000008,0.0000000,0.0000000,50.0000000); //
  756.     CreateDynamicObject(2121,2300.5000000,-1438.0999756,23.5000000,0.0000000,0.0000000,220.0000000); //
  757.     CreateDynamicObject(2725,2300.5000000,-1437.0999756,23.3999996,0.0000000,0.0000000,0.0000000); //
  758.     CreateDynamicObject(2822,2300.3999023,-1437.0999756,23.8999996,0.0000000,0.0000000,0.0000000); //
  759.     CreateDynamicObject(2913,2304.8000488,-1441.4602051,23.8600006,0.0000000,270.0000000,358.0000000); //
  760.  
  761.     //VEHICLES
  762.     //LSPD
  763.     AddStaticVehicleEx(523,1585.2291,-1676.4011,5.4624,270.0000,-1,-1,900); //police bike
  764.     AddStaticVehicleEx(523,1585.2291,-1679.0729,5.4607,270.0000,-1,-1,900); //police bike
  765.     AddStaticVehicleEx(596,1583.3301,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
  766.     AddStaticVehicleEx(598,1587.4896,-1710.1624,5.6129,0,-1,-1,900); //police lvpd car
  767.     AddStaticVehicleEx(427,1558.7682,-1710.4094,6.0225,359.5701,-1,-1,900); //police enforcer
  768.     AddStaticVehicleEx(596,1578.5399,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
  769.     AddStaticVehicleEx(596,1574.4989,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
  770.     AddStaticVehicleEx(596,1570.3170,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
  771.     AddStaticVehicleEx(596,1535.7517,-1678.2754,15.0000,0,-1,-1,900); //police lspd car
  772.     AddStaticVehicleEx(497,1549.5,-1644.1257,33.0,90.0,0,1,900); // Roof Chopper
  773.     AddStaticVehicleEx(497,1549.5,-1707.3848,33.0,90.0,0,1,900); // Roof Chopper
  774.     AddStaticVehicleEx(601,1564.4753,-1711.6448,5.6510,5.6801,-1,-1,900); //swat tank
  775.     AddStaticVehicleEx(528,1558.0299,-1694.0360,5.9432,180,-1,-1,900); //swat vehicle
  776.     AddStaticVehicleEx(528,1561.2257,-1694.0164,5.9347,180,-1,-1,900); //swat vehicle 02
  777.     AddStaticVehicleEx(598,1591.4315,-1710.1624,5.6255,0,-1,-1,900); //police lvpd car
  778.     AddStaticVehicleEx(596,1601.8004,-1704.2368,5.6111,90,-1,-1,900); //police lspd car
  779.     AddStaticVehicleEx(596,1601.8004,-1700.1127,5.6111,90,-1,-1,900); //police lspd car
  780.     AddStaticVehicleEx(596,1601.8004,-1696.0378,5.6111,90,-1,-1,900); //police lspd car
  781.     AddStaticVehicleEx(596,1601.8004,-1691.9602,5.6111,90,-1,-1,900); //police lspd car
  782.     AddStaticVehicleEx(596, 1535.7517, -1668.5831, 13.1053, 360.0000, 0, 1, 900); // police lspd car
  783.     AddStaticVehicleEx(599,1585.3041,-1671.7306,6.1209,269.1276,0,1,900); //police rancher car
  784.     AddStaticVehicleEx(599,1585.5951,-1667.6407,6.0218,270.1369,0,1,900); //police rancher car
  785.     AddStaticVehicleEx(598,1601.8846,-1683.9987,5.6107,89.8121,0,1,900); //police lvpd car
  786.     AddStaticVehicleEx(598,1602.0452,-1687.9415,5.6112,90.9819,0,1,900); //police lvpd car
  787.     AddStaticVehicleEx(523,1600.2445,-1711.6592,5.4535,44.0296,0,1,900); //police bike
  788.     AddStaticVehicleEx(523,1602.6547,-1709.4182,5.4535,46.7312,0,1,900); //police bike
  789.     AddStaticVehicleEx(598,1595.4485,-1710.2502,5.6096,359.5797,0,1,900); //police lvpd car
  790.     //SPAWN CARS
  791.     AddStaticVehicleEx(579,883.5909,-1658.0751,13.4765,180.1207,0,0,900); // Huntley
  792.     AddStaticVehicleEx(421,870.3824,-1678.7533,13.4294,179.4584,1,1,900); // Washington
  793.     //HOSPITAL
  794.     AddStaticVehicleEx(563, 1162.5315, -1373.2607, 32.3312, 270.1107, 3, 1, 900); // Raindance 1
  795.     AddStaticVehicleEx(563, 1163.3928, -1357.1760, 32.3656, 269.4890, 3, 1, 900); //Raindance 2
  796.     //AIRPORT
  797.     AddStaticVehicleEx(519,1889.6531,-2629.1267,14.4657,0,-1,-1,900); // Shamal 1
  798.     AddStaticVehicleEx(519,1823.1190,-2629.1267,14.4657,0,-1,-1,900); // Shamal 2
  799.     AddStaticVehicleEx(519,1754.5325,-2629.1267,14.4657,0,-1,-1,900); // Shamal 3
  800.     AddStaticVehicleEx(487,1964.2646,-2629.1267,13.7619,0,-1,-1,900); // Heli 1
  801.     AddStaticVehicleEx(487,1944.7985,-2629.1267,13.7354,0,-1,-1,900); // Heli 2
  802.     AddStaticVehicleEx(417,1765.6274,-2285.0801,26.8743,0,-1,-1,900); // Levi 1
  803.     AddStaticVehicleEx(593,1616.7531,-2627.9131,14.0094,0,-1,-1,900); // Dodo 1
  804.     AddStaticVehicleEx(593,1681.9587,-2627.9131,14.0094,0,-1,-1,900); // Dodo 2
  805.     //BOATS
  806.     AddStaticVehicleEx(430,2473.2754,-2716.4000,0,90,-1,-1,900); // LSPD 1
  807.     AddStaticVehicleEx(430,2446.4270,-2716.4000,0,90,-1,-1,900); // LSPD 2
  808.     //BIKES
  809.     AddStaticVehicleEx(481,1909.3695,-1416.4291,16.0000,90.0000,26,1,900); // Skatepark 1
  810.     AddStaticVehicleEx(481,1927.2667,-1436.1995,16.0000,90.0000,26,1,900); // Skatepark 2
  811.     //BOATS
  812.     AddStaticVehicleEx(484,719.9970,-1696.9248,0.1500,180.0000,1,1,900); // Boat 1
  813.     AddStaticVehicleEx(453,719.9970,-1626.4930,0.1500,180.0000,1,1,900); // Boat 2
  814.     AddStaticVehicleEx(453,719.9970,-1638.4017,0.1500,180.0000,1,1,900); // Boat 3
  815.     //STRANDEDCARS
  816.     AddStaticVehicleEx(480,2493.5391,1239.4542,10.5939,0.1534,1,1,900); // Comet 1
  817.     AddStaticVehicleEx(480,-1576.0280,-2728.5027,48.2507,144.9941,1,1,900); // Comet 2
  818.     AddStaticVehicleEx(480,2441.3447,2017.1165,10.5276,270.8628,1,1,900); // Comet 3
  819.     AddStaticVehicleEx(480,1117.5936,2069.2937,10.5276,181.1499,1,1,900); // Comet 4
  820.     AddStaticVehicleEx(480,920.9744,2012.0786,10.8600,269.9051,1,1,900); // Comet 5
  821.     //SPECIAL
  822.     AddStaticVehicleEx(454,729.2374,-1496.4160,0.2745,179.2701,-1,-1,900); // boat1
  823.     AddStaticVehicleEx(512,-1436.8271,-946.4916,201.3638,270.5414,-1,-1,900); // cropduster
  824.     AddStaticVehicleEx(532,-346.0279,-1067.7395,60.5232,357.7303,-1,-1,900); // combineharvester
  825.     AddStaticVehicleEx(442,930.0162,-1064.6062,24.1230,179.2080,0,0,900); // romero
  826.     AddStaticVehicleEx(525, 2282.9084, -2351.3218, 13.4, 225.36, 1, 79, 900); // TowTruck Pos
  827.     AddStaticVehicleEx(525, 2289.9924, -2344.1809, 13.4, 225.36, 1, 79, 900); // TowTruck Pos
  828.     AddStaticVehicleEx(525, 2297.6077, -2336.4568, 13.4, 225.36, 1, 79, 900); // TowTruck Pos
  829.     AddStaticVehicleEx(572,743.7960,-594.3464,16.9159,269.2212,3,3,900); // mower
  830.     AddStaticVehicleEx(428,1385.0476,-1009.4760,27.3589,0.1330,-1,-1,900); // bankvan
  831.     AddStaticVehicleEx(508,-89.3810,-1604.8574,2.9916,121.6778,-1,-1,900); // camper
  832.     AddStaticVehicleEx(469,1291.3120,-789.5865,96.4699,359.3932,-1,-1,900); // heli
  833.     AddStaticVehicleEx(495,452.7136,-1812.0624,5.8968,181.9573,-1,-1,900); // sandking1
  834.     AddStaticVehicleEx(495,447.6973,-1812.1508,5.8961,181.4140,-1,-1,900); // sandking2
  835.     AddStaticVehicleEx(553,2112.0979,-2422.7620,14.8796,177.6028,73,118,900); // nevada
  836.     AddStaticVehicleEx(530,1083.8391,-1230.6941,15.5836,0.0,-1,-1,900); // forklift
  837.     AddStaticVehicleEx(446,2106.2417,-94.8254,-0.3685,125.0311,-1,-1,900); // speedboat
  838.     AddStaticVehicleEx(577,1585.6345,1188.1622,10.6200,180.0000,1,1,900); // lv plane
  839.     AddStaticVehicleEx(470,1544.1649,16.5959,24.1309,99.8654,-1,-1,900); // partiot
  840.     AddStaticVehicleEx(478,1535.5079,25.7885,24.1359,193.4562,-1,-1,900); // walton
  841.     AddStaticVehicleEx(489,1547.9408,-20.5773,21.5223,270.9849,0,0,900); // rancher 1
  842.     AddStaticVehicleEx(489,1520.1488,5.2112,24.1746,281.2211,0,0,900); // rancher 2
  843.     //FBI
  844.     AddStaticVehicleEx(490,1759.6000,-1680.1136,16.0000,270.0000,0,0,900); // Rancher 1
  845.     AddStaticVehicleEx(490,1759.6000,-1675.2715,16.0000,270.0000,0,0,900); // Rancher 2
  846.     AddStaticVehicleEx(482,1759.6000,-1667.3435,16.0000,270.0000,0,0,900); // Burrito 1
  847.     AddStaticVehicleEx(482,1759.6000,-1661.9944,16.0000,270.0000,0,0,900); // Burrito 2
  848.     AddStaticVehicleEx(415,1775.1281,-1703.4574,16.0000,358.0000,0,0,900); // Cheetah 1
  849.     AddStaticVehicleEx(415,1783.0220,-1703.4574,16.0000,358.0000,0,0,900); // Cheetah 2
  850.     // TRASHMAN
  851.     AddStaticVehicleEx(408, 2183.7778, -1989.2, 16.0, 0.0, 1, 1, 900); // Trashmaster #1
  852.     AddStaticVehicleEx(408, 2188.0386, -1989.2, 16.0, 0.0, 1, 1, 900); // Trashmaster #2
  853.     AddStaticVehicleEx(408, 2192.1223, -1989.2, 16.0, 0.0, 1, 1, 900); // Trashmaster #3
  854.     AddStaticVehicleEx(574,2156.8496,-1970.3,16.0,0.0,1,1,900); // Sweeper #1
  855.     AddStaticVehicleEx(574,2159.9492,-1970.3,16.0,0.0,1,1,900); // Sweeper #2
  856.     AddStaticVehicleEx(574,2163.0276,-1970.3,16.0,0.0,1,1,900); // Sweeper #3
  857.     AddStaticVehicleEx(574,2165.9788,-1970.3,16.0,0.0,1,1,900); // Sweeper #4
  858.     //TAXI VEHICLES
  859.     AddStaticVehicleEx(438,1732.7784,-1858.6791,16.000,270,-1,-1,900); // Oldschool Cab 1
  860.     AddStaticVehicleEx(438,1755.5264,-1858.6791,16.000,270,-1,-1,900); // Oldschool Cab 2
  861.     AddStaticVehicleEx(438,1802.4722,-1864.7412,13.5806,358.2501,-1,-1,900); // Oldschool Cab 3
  862.     AddStaticVehicleEx(438,1798.2456,-1864.6693,13.5776,359.2436,-1,-1,900); // Oldschool Cab 4
  863.     AddStaticVehicleEx(420,1749.4923,-1851.2766,16.000,90,-1,-1,900); // Taxi 1
  864.     AddStaticVehicleEx(420,1730.4237,-1851.2766,16.000,90,-1,-1,900); // Taxi 2
  865.     AddStaticVehicleEx(420,1791.7245,-1864.8146,13.3530,0,-1,-1,900); // Taxi 3
  866.     //GROVE
  867.     AddStaticVehicleEx(550,2489.4717,-1682.6398,13.1574,270.4214,86,86,900); // Sunrise 1
  868.     AddStaticVehicleEx(550,2487.4917,-1655.0593,13.1558,90.0239,86,86,900); // Sunrise 2
  869.     AddStaticVehicleEx(492,2506.0317,-1676.8611,13.1585,325.6313,86,36,900); // Greenwood 3
  870.     AddStaticVehicleEx(492,2508.3210,-1666.6718,13.1791,13.1814,86,36,900); // Greenwood 4
  871.     AddStaticVehicleEx(509,2525.9890,-1663.8104,16.0,90.0,86,36,900); // Grove Street LowRiderbike #1
  872.     AddStaticVehicleEx(509,2527.8147,-1663.8104,16.0,90.0,86,36,900); // Grove Street LowRiderbike #2
  873.     //BALLAS
  874.     AddStaticVehicleEx(566,2015.3771,-1130.9552,24.7592,89.4981,85,85,900); // Tahoma 1
  875.     AddStaticVehicleEx(566,1993.3444,-1130.9552,25.3730,89.4981,85,85,900); // Tahoma 2
  876.     AddStaticVehicleEx(566,2013.4194,-1094.5210,24.4616,339.1252,85,85,900); // Tahoma 3
  877.     AddStaticVehicleEx(566,2008.5813,-1092.7949,24.4593,339.3990,85,85,900); // Tahoma 4
  878.     //TRAIN
  879.     AddStaticVehicleEx(538,1700.7551,-1953.6531,14.8756,200.0,-1,-1,900); // Train
  880.     //CIVILIAN
  881.     AddStaticVehicleEx(566, 2472.315673, -1756.201782, 13.328715, 90.356803, 1, 1, 1000);
  882.     AddStaticVehicleEx(492, 2407.390136, -1720.056640, 13.437445, 359.391937, 0, 1, 1000);
  883.     AddStaticVehicleEx(492, 2372.167236, -1719.807250, 13.340145, 181.111633, 0, 1, 1000);
  884.     AddStaticVehicleEx(400, 2337.155273, -1674.494018, 13.227672, 0.323259, 1, 1, 1000);
  885.     AddStaticVehicleEx(566, 2337.202636, -1682.487670, 13.219305, 0.216799, 0, 0, 1000);
  886.     return 1;
  887. }
  888.  
  889. public OnGameModeExit()
  890. {
  891.     return 1;
  892. }
  893.  
  894. public OnPlayerRequestClass(playerid, classid)
  895. {
  896.     SpawnPlayer(playerid);
  897.     return 1;
  898. }
  899.  
  900. public OnPlayerConnect(playerid)
  901. {
  902.     TextDrawShowForPlayer(playerid, Textdraw0);
  903.     TextDrawShowForPlayer(playerid, Textdraw1);
  904.     TextDrawShowForPlayer(playerid, Textdraw2);
  905.     TextDrawShowForPlayer(playerid, Textdraw3);
  906.     TextDrawShowForPlayer(playerid, Textdraw4);
  907.     TextDrawShowForPlayer(playerid, Textdraw5);
  908.     AlreadyGiveWeapons[playerid] = false;
  909.     server_ResetCash(playerid); //Resetting the players cash variable to zero.
  910.     new string[128];
  911.     if(fexist(UserPath(playerid)))
  912.     {
  913.         INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  914.         ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Login","Welcome back to TCoLS RPG.\n\nThat name is registered. Please enter your password below.","Login","Quit"); //login
  915.         format(string, sizeof(string), ""COL_WHITE"Welcome back to "COL_YELLOW"TCoLS, "COL_WHITE"%s!", GetPlayerFirstName(playerid));
  916.         SendClientMessage(playerid, -1, string);
  917.     }
  918.     else
  919.     {
  920.         ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Register","Welcome to TCoLS RPG.\n\nPlease register your account by typing the password below.","Register","Quit");
  921.         format(string, sizeof(string), ""COL_WHITE"Welcome to "COL_YELLOW"TCoLS, "COL_WHITE"%s!", GetPlayerFirstName(playerid));
  922.         SendClientMessage(playerid, -1, string);
  923.     }
  924.     if(!IsValidName(playerid) && !IsPlayerNPC(playerid) && PlayerInfo[playerid][pAdmin] < 2)
  925.     {
  926.         format(string, sizeof(string), "AdmCmd: %s has been kicked by NameChecker, reason: Invalid name format.", GetName(playerid));
  927.         SendClientMessage(playerid, COLOR_LIGHTRED, "You've been kicked by NameChecker, reason: Invalid name format. (Firstname_Lastname)");
  928.         Kick(playerid);
  929.     }
  930.     SetPlayerInterior(playerid,0);
  931.     TogglePlayerSpectating(playerid, 1);
  932.     gPlayerLogged[playerid] = 1;
  933.     return 1;
  934. }
  935.  
  936. public OnPlayerDisconnect(playerid, reason)
  937. {
  938.     new discstring[128];
  939.     switch(reason)
  940.     {
  941.         case 0: format(discstring, sizeof(discstring), "* %s has left the server. (Timeout)", GetName(playerid));
  942.         case 1: format(discstring, sizeof(discstring), "* %s has left the server. (Leaving)", GetName(playerid));
  943.         case 2: format(discstring, sizeof(discstring), "* %s has left the server. (Kicked)", GetName(playerid));
  944.     }
  945.     ProxDetector(30.0, playerid, discstring, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  946.     SaveAccountInfo(playerid);
  947.     SaveWeaponsToFile(playerid);
  948.     return 1;
  949. }
  950.  
  951. public OnPlayerSpawn(playerid)
  952. {
  953.     TextDrawHideForPlayer(playerid, Text:Textdraw0);
  954.     TextDrawHideForPlayer(playerid, Text:Textdraw1);
  955.     TextDrawHideForPlayer(playerid, Text:Textdraw2);
  956.     TextDrawHideForPlayer(playerid, Text:Textdraw3);
  957.     TextDrawHideForPlayer(playerid, Text:Textdraw4);
  958.     TextDrawHideForPlayer(playerid, Text:Textdraw5);
  959.     SetTimerEx("blood",1000,true,"i",playerid);
  960.     ResetPlayerWeapons(playerid);
  961.     SetPlayerVirtualWorld(playerid, 0);
  962.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
  963.     SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
  964.     SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
  965.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1);
  966.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
  967.     if (!AlreadyGiveWeapons[playerid]) SetTimerEx("LoadWeaponsToFile",250,false,"i",playerid);
  968.     return 1;
  969. }
  970.  
  971. public OnPlayerDeath(playerid, killerid, reason)
  972. {
  973.     PlayerInfo[killerid][pKills]++;
  974.     PlayerInfo[playerid][pDeaths]++;
  975.     return 1;
  976. }
  977.  
  978. public OnVehicleSpawn(vehicleid)
  979. {
  980.     return 1;
  981. }
  982.  
  983. public OnVehicleDeath(vehicleid, killerid)
  984. {
  985.     return 1;
  986. }
  987.  
  988. public OnPlayerText(playerid, text[])
  989. {
  990.     if (realchat)
  991.     {
  992.         new string[128];
  993.         format(string, sizeof(string), "%s says: %s", GetName(playerid), text);
  994.         ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  995.         format(string, sizeof(string), "says: %s", text);
  996.         SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000);
  997.         return 0;
  998.     }
  999.     return 1;
  1000. }
  1001.  
  1002. public OnPlayerCommandText(playerid, cmdtext[])
  1003. {
  1004.     return 0;
  1005. }
  1006.  
  1007. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1008. {
  1009.     return 1;
  1010. }
  1011.  
  1012. public OnPlayerExitVehicle(playerid, vehicleid)
  1013. {
  1014.     return 1;
  1015. }
  1016.  
  1017. public OnPlayerStateChange(playerid, newstate, oldstate)
  1018. {
  1019.     return 1;
  1020. }
  1021.  
  1022. public OnPlayerEnterCheckpoint(playerid)
  1023. {
  1024.     return 1;
  1025. }
  1026.  
  1027. public OnPlayerLeaveCheckpoint(playerid)
  1028. {
  1029.     return 1;
  1030. }
  1031.  
  1032. public OnPlayerEnterRaceCheckpoint(playerid)
  1033. {
  1034.     return 1;
  1035. }
  1036.  
  1037. public OnPlayerLeaveRaceCheckpoint(playerid)
  1038. {
  1039.     return 1;
  1040. }
  1041.  
  1042. public OnRconCommand(cmd[])
  1043. {
  1044.     return 1;
  1045. }
  1046.  
  1047. public OnPlayerRequestSpawn(playerid)
  1048. {
  1049.     return 1;
  1050. }
  1051.  
  1052. public OnObjectMoved(objectid)
  1053. {
  1054.     return 1;
  1055. }
  1056.  
  1057. public OnPlayerObjectMoved(playerid, objectid)
  1058. {
  1059.     return 1;
  1060. }
  1061.  
  1062. public OnPlayerPickUpPickup(playerid, pickupid)
  1063. {
  1064.     return 1;
  1065. }
  1066.  
  1067. public OnVehicleMod(playerid, vehicleid, componentid)
  1068. {
  1069.     return 1;
  1070. }
  1071.  
  1072. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1073. {
  1074.     return 1;
  1075. }
  1076.  
  1077. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1078. {
  1079.     return 1;
  1080. }
  1081.  
  1082. public OnPlayerSelectedMenuRow(playerid, row)
  1083. {
  1084.     return 1;
  1085. }
  1086.  
  1087. public OnPlayerExitedMenu(playerid)
  1088. {
  1089.     return 1;
  1090. }
  1091.  
  1092. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1093. {
  1094.     return 1;
  1095. }
  1096.  
  1097. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1098. {
  1099.     return 1;
  1100. }
  1101.  
  1102. public OnRconLoginAttempt(ip[], password[], success)
  1103. {
  1104.     return 1;
  1105. }
  1106.  
  1107. public OnPlayerUpdate(playerid)
  1108. {
  1109.     return 1;
  1110. }
  1111.  
  1112. public OnPlayerStreamIn(playerid, forplayerid)
  1113. {
  1114.     return 1;
  1115. }
  1116.  
  1117. public OnPlayerStreamOut(playerid, forplayerid)
  1118. {
  1119.     return 1;
  1120. }
  1121.  
  1122. public OnVehicleStreamIn(vehicleid, forplayerid)
  1123. {
  1124.     return 1;
  1125. }
  1126.  
  1127. public OnVehicleStreamOut(vehicleid, forplayerid)
  1128. {
  1129.     return 1;
  1130. }
  1131.  
  1132. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1133. {
  1134.     new tmp2[256];
  1135.     if(IsPlayerConnected(playerid))
  1136.     {
  1137.         if(dialogid == 1)
  1138.         {
  1139.             if (!response) return Kick(playerid);
  1140.             if(response)
  1141.             {
  1142.                 if(!strlen(inputtext)) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Register","Welcome to TCoLS.\n\nPlease register your account by typing the password below.","Register","Quit");
  1143.                 new INI:File = INI_Open(UserPath(playerid));
  1144.                 INI_SetTag(File,"data");
  1145.                 INI_WriteInt(File,"Password",udb_hash(inputtext));
  1146.                 INI_WriteInt(File,"Cash",0);
  1147.                 INI_WriteInt(File,"Skin",0);
  1148.                 INI_WriteInt(File,"Level",0);
  1149.                 INI_WriteInt(File,"Int",0);
  1150.                 INI_WriteInt(File,"VW",0);
  1151.                 INI_WriteInt(File,"Admin",0);
  1152.                 INI_WriteInt(File,"SecKey",0);
  1153.                 INI_WriteInt(File,"Kills",0);
  1154.                 INI_WriteInt(File,"Deaths",0);
  1155.                 INI_WriteFloat(File,"FacingAngle",0);
  1156.                 INI_WriteFloat(File,"Health",0);
  1157.                 INI_WriteFloat(File,"Armour",0);
  1158.                 INI_WriteFloat(File,"LastX",0);
  1159.                 INI_WriteFloat(File,"LastY",0);
  1160.                 INI_WriteFloat(File,"LastZ",0);
  1161.                 INI_Close(File);
  1162.                 SetSpawnInfo(playerid, 0, 293, 2492.878417, -1750.079589, 13.495314, 90, 0, 0, 0, 0, 0, 0);
  1163.                 SpawnPlayer(playerid);
  1164.                 ResetPlayerWeapons(playerid);
  1165.                 SetPlayerInterior(playerid,0);
  1166.                 SetPlayerVirtualWorld(playerid, 0);
  1167.                 SetPlayerScore(playerid, 1);
  1168.                 server_GiveCash(playerid, 1000);
  1169.                 SetCameraBehindPlayer(playerid);
  1170.                 PlayerInfo[playerid][pSkin] = 299;
  1171.                 PlayerInfo[playerid][pInt] = 0;
  1172.                 PlayerInfo[playerid][pVW] = 0;
  1173.                 PlayerInfo[playerid][pLevel] = 1;
  1174.                 SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
  1175.                 format(tmp2, sizeof(tmp2), "~y~Welcome ~n~~b~   %s", GetName(playerid));
  1176.                 GameTextForPlayer(playerid, tmp2, 5000, 1);
  1177.                 TogglePlayerSpectating(playerid, 0);
  1178.             }
  1179.         }
  1180.         if(dialogid == 2)
  1181.         {
  1182.             if ( !response ) return Kick ( playerid );
  1183.             if( response )
  1184.             {
  1185.                 if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  1186.                 {
  1187.                     INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  1188.                     SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ], PlayerInfo[playerid][pFacingAngle], 0, 0, 0, 0, 0, 0);
  1189.                     SpawnPlayer(playerid);
  1190.                     server_GiveCash(playerid, PlayerInfo[playerid][pCash]);
  1191.                     SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  1192.                     SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  1193.                     SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  1194.                     SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
  1195.                     SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  1196.                     SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
  1197.                     format(tmp2, sizeof(tmp2), "~y~Welcome ~n~~b~   %s", GetName(playerid));
  1198.                     GameTextForPlayer(playerid, tmp2, 5000, 1);
  1199.                     TogglePlayerSpectating(playerid, 0);
  1200.                     if(PlayerInfo[playerid][pAdmin] >= 1)
  1201.                     {
  1202.                         format(tmp2, sizeof(tmp2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
  1203.                         SendClientMessage(playerid, COLOR_WHITE,tmp2);
  1204.                         ShowPlayerDialog(playerid, 3,DIALOG_STYLE_INPUT,"Admin Login","Please provide your security code for your admin account to be authorized.\n\nPlease enter your security code below.","Login","Quit"); //admin authorization
  1205.                     }
  1206.                 }
  1207.                 else
  1208.                 {
  1209.                     ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Login","Welcome back to TCoLS .\n\nThat name is registered. Please enter your password below.","Login","Quit");
  1210.                 }
  1211.                 return 1;
  1212.             }
  1213.         }
  1214.         if(dialogid == 3)
  1215.         {
  1216.             if(gAdminAuthorized[playerid] == 1)
  1217.             {
  1218.                 SendClientMessage(playerid, COLOR_WHITE, "SERVER: Your admin account has already been authorized.");
  1219.                 return 1;
  1220.             }
  1221.             if(response)
  1222.             {
  1223.                 if(!strlen(inputtext))
  1224.                 {
  1225.                     ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Admin Login","Please provide your security code for your admin account to be authorized.\n\nPlease enter your security code below.","Login","Quit"); //admin authorization
  1226.                     SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter your security code.");
  1227.                     return 1;
  1228.                 }
  1229.                 if(strlen(inputtext) >= 50)
  1230.                 {
  1231.                     ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Admin Login","Please provide your security code for your admin account to be authorized.\n\nPlease enter your security code below.","Login","Quit"); //admin authorization
  1232.                     SendClientMessage(playerid, COLOR_WHITE, "SERVER: Security code is too long.");
  1233.                     return 0;
  1234.                 }
  1235.                 if(fexist(UserPath(playerid)))
  1236.                 {
  1237.                     new tmp;
  1238.                     new seckey = strval(inputtext);
  1239.                     tmp = PlayerInfo[playerid][pSecKey];
  1240.                     if(tmp == 0)
  1241.                     {
  1242.                         SendClientMessage(playerid, COLOR_RED, "SERVER: You do not have a valid Security Key.");
  1243.                         Kick(playerid);
  1244.                         return 1;
  1245.                     }
  1246.                     if(seckey != tmp)
  1247.                     {
  1248.                         SendClientMessage(playerid, COLOR_RED, "SERVER: Security Key does not match. You have been kicked as a result.");
  1249.                         Kick(playerid);
  1250.                         return 1;
  1251.                     }
  1252.                     else
  1253.                     {
  1254.                         gAdminAuthorized[playerid] = 1;
  1255.                         SendClientMessage(playerid, COLOR_WHITE, "SERVER: Your admin account has successfully been authorized.");
  1256.                         format(tmp2, sizeof(tmp2), "~y~Welcome ~n~~b~   %s", GetName(playerid));
  1257.                         GameTextForPlayer(playerid, tmp2, 5000, 1);
  1258.                         TogglePlayerSpectating(playerid, 0);
  1259.                         return 1;
  1260.                     }
  1261.                 }
  1262.             }
  1263.             else
  1264.             {
  1265.                 Kick(playerid);
  1266.             }
  1267.         }
  1268.     }
  1269.     return 1;
  1270. }
  1271.  
  1272. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1273. {
  1274.     return 1;
  1275. }
  1276.  
  1277. //______________ADMIN COMMANDS____________________
  1278. CMD:ah(playerid, params[]) return cmd_ahelp(playerid, params);
  1279.  
  1280. CMD:ahelp(playerid, params[])
  1281. {
  1282.     new alevel = PlayerInfo[playerid][pAdmin];
  1283.  
  1284.     if(PlayerInfo[playerid][pAdmin] >= 1)
  1285.     {
  1286.         SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");
  1287.         if(alevel >= 1)
  1288.         {
  1289.             SendClientMessage(playerid, COLOR_GRAD1, "1 Moderator: (/ah)elp");
  1290.         }
  1291.         if(alevel >= 2)
  1292.         {
  1293.             SendClientMessage(playerid, COLOR_GRAD2, "2 Junior Admin: /kick /ban /goto /sendtols /gotols /spawn");
  1294.         }
  1295.         if(alevel >= 3)
  1296.         {
  1297.             SendClientMessage(playerid, COLOR_GRAD3, "3 General Admin: /noooc /setskin /givegun /gotoint");
  1298.         }
  1299.         if(alevel >= 4)
  1300.         {
  1301.             SendClientMessage(playerid, COLOR_GRAD4, "4 Senior Admin: /veh /sethp /setarmor /givemoney");
  1302.         }
  1303.         if(alevel >= 1337)
  1304.         {
  1305.             SendClientMessage(playerid, COLOR_GRAD5, "1337+ Admin: /rac ");
  1306.         }
  1307.         if(alevel >= 99999)
  1308.         {
  1309.             SendClientMessage(playerid, COLOR_GRAD5, "99999+ Executive Admin: /makeadmin");
  1310.         }
  1311.         if(IsPlayerAdmin(playerid))
  1312.         {
  1313.             SendClientMessage(playerid, COLOR_GRAD5, "RCON Admin: /rcon cmdlist");
  1314.         }
  1315.         SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");
  1316.     }
  1317.     else SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1318.     return 1;
  1319. }
  1320.  
  1321. CMD:localizejob(playerid, params[])
  1322. {
  1323.     if(sscanf(params, "s[32]", params))
  1324.     {
  1325.         SendClientMessage(playerid, COLOR_WHITE, "USAGE: /localizejob [job]");
  1326.         SendClientMessage(playerid, COLOR_GREY, "JOBS: sweeper | trucker | pizzaboy | courier | farmer | off");
  1327.  
  1328.         return 1;
  1329.     }
  1330.     if(!strcmp(params, "off", true))
  1331.     {
  1332.          DisablePlayerCheckpoint(playerid);
  1333.          SendClientMessage(playerid, COLOR_WHITE, "You have cleared the marker on your map.");
  1334.     }
  1335.     else if(!strcmp(params, "sweeper", true))
  1336.     {
  1337.          SetPlayerCheckpoint(playerid, 1434.9597,-1845.5957,13.5469, 3);
  1338.          SendClientMessage(playerid, COLOR_WHITE, "The sweeper job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
  1339.     }
  1340.     else if(!strcmp(params,"trucker", true))
  1341.     {
  1342.         SetPlayerCheckpoint(playerid, 2070.7717,-1939.3361,13.5469, 3);
  1343.         SendClientMessage(playerid, COLOR_WHITE, "The trucker job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
  1344.     }
  1345.     else if(!strcmp(params,"pizzaboy", true))
  1346.     {
  1347.         SetPlayerCheckpoint(playerid, 2113.8711,-1786.4855,13.5608, 3);
  1348.         SendClientMessage(playerid, COLOR_WHITE, "The pizza boy job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
  1349.     }
  1350.     else if(!strcmp(params,"courier", true))
  1351.     {
  1352.         SetPlayerCheckpoint(playerid, 1615.8240,-1842.1359,13.5307, 3);
  1353.         SendClientMessage(playerid, COLOR_WHITE, "The courier job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
  1354.     }
  1355.     else if(!strcmp(params,"farmer", true))
  1356.     {
  1357.         SetPlayerCheckpoint(playerid, -481.2557,-1458.7404,15.3066, 3);
  1358.         SendClientMessage(playerid, COLOR_WHITE, "The farmer job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
  1359.     }
  1360.     return 1;
  1361. }
  1362.  
  1363. CMD:cmds(playerid, params[])
  1364. {
  1365.     new long_string[600];
  1366.     strcat(long_string, "/bankhelp - /deposit - /withdraw - /transfer - /balance\n/me - /do - /buyskin - /stats - /cmds - /help - /newbie - /shake\n/w - (/w)hisper - (/o)oc - (/s)hout - (/l)ow - /b - /pay - /time - /id - /kill\n/dgun - /dropgun - /pgun - /pickupgun - /v - /trunk - /vlock - /trackcar - /fuel\n/localizejob - /pizza - /courier - /petrol - /harvest - /sweeper");
  1367.     ShowPlayerDialog(playerid, 712, DIALOG_STYLE_MSGBOX, "Commands", long_string, "CANCEL", "");
  1368.     return 1;
  1369. }
  1370.  
  1371. CMD:help(playerid, params[])
  1372. {
  1373.     new long_string[400];
  1374.     strcat(long_string, "Use /cmds to check commands, bro!\nBest way to earn money is working as drug dealer with gangs.\nServer Owner: Goldie\nServer Website: www.mGaming.pl Full Gaming Service Name: Miami Gaming\nScript is fully created by Goldie.");
  1375.     ShowPlayerDialog(playerid, 713, DIALOG_STYLE_MSGBOX, "Help", long_string, "CANCEL", "");
  1376.     return 1;
  1377. }
  1378.  
  1379. CMD:newbie(playerid, params[])
  1380. {
  1381.     new sendername[MAX_PLAYER_NAME], string[160];
  1382.     if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command.");
  1383.     if(isnull(params)) return SCM(playerid, COLOR_GREY,"USAGE: /newbie [ask a question here]");
  1384.     GetPlayerName(playerid,sendername,sizeof(sendername));
  1385.     sendername[strfind(sendername,"_")] = ' ';
  1386.     format(string,160,"((NEWBIE: %s: %s ))", sendername, params);
  1387.     printf("%s", string);
  1388.     OOCOff(COLOR_BLUE,string);
  1389.     return 1;
  1390. }
  1391.  
  1392. CMD:veh(playerid, params[])
  1393. {
  1394.     new car,color,color2;
  1395.     if(PlayerInfo[playerid][pAdmin] >= 4)
  1396.     {
  1397.         if(sscanf(params, "iii", car,color,color2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [model] [color1] [color2]");
  1398.         if(car < 400 || car > 611) return SendClientMessage(playerid,COLOR_GRAD2, "Invalid vehicle ID specified !(411 - 611)");
  1399.         if(color> 255 || color< 0) return SendClientMessage(playerid, COLOR_GRAD2, "Car color ID's: 0-255");
  1400.         if(color2> 255 || color2< 0) return SendClientMessage(playerid, COLOR_GRAD2, "Car color ID's: 0-255");
  1401.         if(IsPlayerInAnyVehicle(playerid)) return RemovePlayerFromVehicle(playerid);
  1402.         new Float:X, Float:Y, Float:Z, Float:A;
  1403.         GetPlayerPos(playerid, X,Y,Z);
  1404.         GetPlayerFacingAngle(playerid,A);
  1405.         new carid = CreateVehicle(car, X,Y,Z,A, color, color2, -1);
  1406.         PutPlayerInVehicle(playerid,carid, 0);
  1407.         LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
  1408.     }
  1409.     else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1410.     return 1;
  1411. }
  1412.  
  1413.  
  1414. CMD:makeadmin(playerid, params[])
  1415. {
  1416.     new pID, value;
  1417.  
  1418.     if(PlayerInfo[playerid][pAdmin] < 99999 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1419.     else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, -1,"USAGE: /makeadmin [playerid/PartOfName] [level 1-99999]");
  1420.     else if (value < 0 || value > 99999) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid level specified !(1-99999)");
  1421.     else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2,"Invalid player specified !");
  1422.     else
  1423.     {
  1424.         new tName[MAX_PLAYER_NAME], string[128];
  1425.         new rand = random(9999);
  1426.         GetPlayerName(pID, tName, MAX_PLAYER_NAME);
  1427.         strreplace(tName, '_', ' ');
  1428.         gAdminAuthorized[pID] = 1;
  1429.         PlayerInfo[pID][pSecKey] = rand;
  1430.         format(string, sizeof(string), "* You've promoted %s to an level %d Administrator.", tName, value);
  1431.         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1432.         format(string, sizeof(string), "* You've been promoted to an level %d Administrator by %s, your security key is %d.", value, GetName(playerid), PlayerInfo[pID][pSecKey]);
  1433.         SendClientMessage(pID, COLOR_LIGHTBLUE, string);
  1434.         printf("AdmCmd: %s has promoted %s to a level %d admin.", GetName(playerid), tName, value);
  1435.         PlayerInfo[pID][pAdmin] = value;
  1436.     }
  1437.     return 1;
  1438. }
  1439.  
  1440. CMD:noooc(playerid, params[])
  1441. {
  1442.  
  1443.     if(PlayerInfo[playerid][pAdmin] >= 3)
  1444.     {
  1445.         if(PlayerInfo[playerid][pAdmin] >= 3 && (!noooc))
  1446.         {
  1447.             noooc = 1;
  1448.             SendClientMessageToAll(COLOR_GRAD2, "OOC chat channel disabled by an Admin !");
  1449.         }
  1450.         else if(PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
  1451.         {
  1452.             noooc = 0;
  1453.             SendClientMessageToAll(COLOR_GRAD2, "OOC chat channel enabled by an Admin !");
  1454.         }
  1455.     }
  1456.     else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1457.     return 1;
  1458. }
  1459.  
  1460. CMD:kick(playerid,params[])
  1461. {
  1462.  
  1463.     new id,name1[MAX_PLAYER_NAME], reason[35], string[128], logstring[256];
  1464.     if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2,NOTADMIN);
  1465.     else if(sscanf(params,"uz",id,reason)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /kick [playerid/PartOfName] [reason]");
  1466.     else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified !");
  1467.     else if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't ban higher level administrators !");
  1468.     else
  1469.     {
  1470.         new year, month, day;
  1471.         getdate(year, month, day);
  1472.         GetPlayerName(id,name1,sizeof(name1));
  1473.         format(string, sizeof(string),"AdmCmd: %s has been kicked by %s, reason: %s",name1, GetName(playerid), reason);
  1474.         SendClientMessageToAll(COLOR_LIGHTRED,string);
  1475.         Kick(id);
  1476.         format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", name1, GetName(playerid), reason, month, day, year);
  1477.         KickLog(logstring);
  1478.     }
  1479.     return 1;
  1480. }
  1481.  
  1482. CMD:ban(playerid, params[])
  1483. {
  1484.  
  1485.     new id, reason[35], name2[MAX_PLAYER_NAME], name1[MAX_PLAYER_NAME], string[128];
  1486.     if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2,NOTADMIN);
  1487.     if(sscanf(params,"uz", id, reason)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /ban [playerid/PartOfName] [Reason]");
  1488.     if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified !");
  1489.     else
  1490.     {
  1491.         if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't ban higher level administrators !");
  1492.         new year, month, day;
  1493.         new logstring[256];
  1494.         getdate(year, month, day);
  1495.         GetPlayerName(id, name2, sizeof(name2));
  1496.         GetPlayerName(playerid, name1, sizeof(name1));
  1497.         format(string, sizeof(string), "AdmCmd: %s has been banned by %s, reason: %s", name2, GetName(playerid), reason);
  1498.         format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", name2, GetName(playerid), reason, month, day, year);
  1499.         BanLog(logstring);
  1500.         SendClientMessageToAll(COLOR_LIGHTRED, string);
  1501.         new plrIP[16];
  1502.         GetPlayerIp(id,plrIP, sizeof(plrIP));
  1503.         SendClientMessage(id,COLOR_YELLOW,"|___________[BAN INFO]___________|");
  1504.         format(string, sizeof(string), "Your name: %s.",name2);
  1505.         SendClientMessage(id, COLOR_WHITE, string);
  1506.         format(string, sizeof(string), "Your IP: %s.",plrIP);
  1507.         SendClientMessage(id, COLOR_WHITE, string);
  1508.         format(string, sizeof(string), "Who banned you: %s.",name1);
  1509.         SendClientMessage(id, COLOR_WHITE, string);
  1510.         format(string, sizeof(string), "Reason: %s.",reason);
  1511.         SendClientMessage(id, COLOR_WHITE, string);
  1512.         SendClientMessage(id,COLOR_YELLOW,"|___________[BAN INFO]___________|");
  1513.         format(string,sizeof(string),"Please take a screenshot of this message (F8) and include it in your ban appeal.",GetName(playerid));
  1514.         SendClientMessage(playerid, COLOR_YELLOW,string);
  1515.         Ban(id);
  1516.     }
  1517.     return 1;
  1518. }
  1519.  
  1520. CMD:goto(playerid, params[])
  1521. {
  1522.     new ID;
  1523.     if(PlayerInfo[playerid][pAdmin] >= 2)
  1524.     {
  1525.         if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "USAGE: /goto [playerid]");//checks if you have written something after /goto if no it sends error
  1526.         else if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");
  1527.         else if(playerid == ID) return SendClientMessage(playerid, COLOR_GRAD2, "You can't goto yourself !");//checks if the player you are teleporting to is connected or if it is yourself if yes then comes an error
  1528.         else//ELSE what will happen if no errors
  1529.         {
  1530.             new pinterior = GetPlayerInterior(ID);
  1531.             new Float:x, Float:y, Float:z;//creates new floats
  1532.             GetPlayerPos(ID, x, y, z);//gets the player id(which we have entered after /goto position and like saves them into x,y,z defined above as floats
  1533.             SetPlayerPos(playerid, x+1, y+1, z);//sets the player position the id of that player +1 in x +1 in y and z remains same as it defines height
  1534.             SetPlayerInterior(playerid, pinterior);
  1535.         }
  1536.     }
  1537.     else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1538.     return 1;
  1539. }
  1540.  
  1541. CMD:gotols(playerid, params[])
  1542. {
  1543.     if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1544.     else
  1545.     {
  1546.         PlayerInfo[playerid][pInt] = 0;
  1547.         SetPlayerInterior(playerid, 0);
  1548.         SetPlayerPos(playerid, 1529.6, -1691.2, 13.3);
  1549.         SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported to Los Santos!");
  1550.     }
  1551.     return 1;
  1552. }
  1553.  
  1554. CMD:givegun(playerid, params[])
  1555. {
  1556.     new id, gun, ammo;
  1557.     if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  1558.     else if(sscanf(params,"uii", id, gun, ammo)) return SCM(playerid, COLOR_GREY,"USAGE: /givegun [playerid/partofname] [gunid] [ammo]");
  1559.     else if(gun > 47 || gun < 1) return SCM(playerid, COLOR_GREY,"GUN ID'S: 1-47");
  1560.     else if(ammo > 999 || ammo < 1) return SCM(playerid, COLOR_GREY,"Ammo 1-999");
  1561.     else
  1562.     {
  1563.         GivePlayerWeapon(id, gun, ammo);
  1564.     }
  1565.     return 1;
  1566. }
  1567.  
  1568. CMD:gotoint(playerid, params[])
  1569. {
  1570.     new Interior, Float: X, Float: Y, Float: Z;
  1571.     if( sscanf( params, "dfff", Interior, X, Y, Z ) )
  1572.     {
  1573.         if (PlayerInfo[playerid][pAdmin] >= 4)
  1574.         {
  1575.             SendClientMessage( playerid, COLOR_WHITE, "USAGE: /gotoint [Interior ID] [x point] [y point] [z point]" );
  1576.         }
  1577.     }
  1578.     else
  1579.     {
  1580.         if (PlayerInfo[playerid][pAdmin] >= 4)
  1581.         {
  1582.             SetPlayerPos( playerid, X, Y, Z );
  1583.             SetPlayerInterior( playerid, Interior );
  1584.             SendClientMessage( playerid, COLOR_GRAD2, "You have been teleported to the defined position !" );
  1585.         }
  1586.     }
  1587.     return 1;
  1588. }
  1589.  
  1590. CMD:rac(playerid, params[])
  1591. {
  1592.     if(PlayerInfo[playerid][pAdmin] >= 1337)
  1593.     {
  1594.         SendClientMessageToAll(COLOR_GRAD2, "SERVER: An admin has initiated an all vehicle respawn !");
  1595.         for(new i = 1; i <= MAX_VEHICLES; i++)
  1596.         {
  1597.             SetVehicleToRespawn(i);
  1598.         }
  1599.     }
  1600.     else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1601.     return 1;
  1602. }
  1603.  
  1604. CMD:givemoney(playerid, params[])
  1605. {
  1606.     if (PlayerInfo[playerid][pAdmin] >= 4)
  1607.     {
  1608.         new string[128], giveplayerid, money;
  1609.         if(sscanf(params, "ud", giveplayerid, money)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemoney [playerid] [money]");
  1610.  
  1611.         if(IsPlayerConnected(giveplayerid))
  1612.         {
  1613.             server_GiveCash(giveplayerid, money);
  1614.             format(string, sizeof(string), "* You have set %s's cash to an amount of $%d.",GetName(giveplayerid),money);
  1615.             SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1616.             new ip[32], ipex[32];
  1617.             new i_dateTime[2][3];
  1618.             gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
  1619.             getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
  1620.             GetPlayerIp(playerid, ip, sizeof(ip));
  1621.             GetPlayerIp(giveplayerid, ipex, sizeof(ipex));
  1622.             format(string, sizeof(string), "[%i/%i/%i - %i:%i:%i] %s (IP:%s) has paid $%d to %s (IP:%s)", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], GetName(playerid), ip, money, GetName(giveplayerid), ipex);
  1623.             PayLog(string);
  1624.             PlayerInfo[playerid][pCash] = money;
  1625.  
  1626.         }
  1627.     }
  1628.     else
  1629.     {
  1630.         SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
  1631.     }
  1632.     return 1;
  1633. }
  1634.  
  1635. CMD:setarmor(playerid, params[])
  1636. {
  1637.     new string[128], playa, health;
  1638.     if(sscanf(params, "ud", playa, health))
  1639.     {
  1640.         SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setarmor [playerid] [armor]");
  1641.         return 1;
  1642.     }
  1643.     if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't set higher level administrator's armor !");
  1644.     if (PlayerInfo[playerid][pAdmin] >= 4)
  1645.     {
  1646.         if(IsPlayerConnected(playa))
  1647.         {
  1648.             if(playa != INVALID_PLAYER_ID)
  1649.             {
  1650.                 SetPlayerArmour(playa, health);
  1651.                 format(string, sizeof(string), "* You have set %s's armor to %d.", GetName(playa), health);
  1652.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1653.             }
  1654.         }
  1655.     }
  1656.     else
  1657.     {
  1658.         SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
  1659.     }
  1660.     return 1;
  1661. }
  1662.  
  1663.  
  1664. CMD:sethp(playerid, params[])
  1665. {
  1666.     new string[128], playa, health;
  1667.     if(sscanf(params, "ud", playa, health))
  1668.     {
  1669.         SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sethp [playerid] [health]");
  1670.         return 1;
  1671.     }
  1672.     if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't set higher level administrator's HP !");
  1673.     if (PlayerInfo[playerid][pAdmin] >= 4) {
  1674.         if(IsPlayerConnected(playa)) {
  1675.             if(playa != INVALID_PLAYER_ID)
  1676.             {
  1677.                 SetPlayerHealth(playa, health);
  1678.                 format(string, sizeof(string), "* You have set %s's health to %d.", GetName(playa), health);
  1679.                 SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1680.             }
  1681.         }
  1682.         else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
  1683.     }
  1684.     else {
  1685.         SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
  1686.     }
  1687.     return 1;
  1688. }
  1689.  
  1690. CMD:setskin(playerid, params[])
  1691. {
  1692.     new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], id, skinid, string[128];
  1693.     if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1694.     else if(sscanf(params, "ui", id, skinid)) return SendClientMessage(playerid, -1, "USAGE: /setskin [playerid] [skinid]");
  1695.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  1696.     GetPlayerName(id, targetname, MAX_PLAYER_NAME);
  1697.     if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player specified !");
  1698.     if(skinid < 1 || skinid > 299) { SendClientMessage(playerid, COLOR_GREY, "   Skin can't be below 1 or above 299 ! (SkinID 0 is not accepted)"); return 1; }
  1699.     else
  1700.     {
  1701.         SetPlayerSkin(id, skinid);
  1702.         format(string, 128, "* Admin %s has set your skinid to skinid %d.", name, skinid);
  1703.         SendClientMessage(id, COLOR_LIGHTBLUE, string);
  1704.         format(string, 128, "* You have set player %s their skinid to %d.", targetname, skinid);
  1705.         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  1706.     }
  1707.     PlayerInfo[id][pSkin] = skinid;
  1708.     return 1;
  1709. }
  1710.  
  1711. CMD:spawn(playerid, params[])
  1712. {
  1713.     new ID;
  1714.     if(PlayerInfo[playerid][pAdmin] >= 2)
  1715.     {
  1716.         if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "USAGE: /spawn [playerid]");//checks if you have written something after /goto if no it sends error
  1717.         else if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");
  1718.         else//ELSE what will happen if no errors
  1719.         {
  1720.             SetPlayerPos(ID, 2492.878417, -1750.079589, 13.495314);
  1721.             SetPlayerFacingAngle(ID, 90);
  1722.             SetPlayerInterior(ID, 0);
  1723.         }
  1724.     }
  1725.     else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1726.     return 1;
  1727. }
  1728.  
  1729. CMD:gethere(playerid,params[])
  1730. {
  1731.     if(PlayerInfo[playerid][pAdmin] >= 2)
  1732.     {
  1733.         new targetid, Float:x, Float:y, Float:z;//defines floats and [U]targetid(same which we did as id above)[/U]
  1734.         new vw = GetPlayerVirtualWorld(playerid);
  1735.         if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gethere [playerid]");//checks if there is something written after /gethere if no sends the usage error
  1736.         else if(playerid == targetid) return SendClientMessage(playerid, COLOR_GRAD2, "You are already at yourself !");
  1737.         if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");//checks if the player you are teleporting to is conne not teleporting ourselves to our self :P if we are it sends error
  1738.         new interior = GetPlayerInterior(playerid);
  1739.         GetPlayerPos(playerid, x, y, z);//gets player pos PLAYER POS not targetid
  1740.         SetPlayerPos(targetid, x+1, y+1, z);
  1741.         GetPlayerVirtualWorld(playerid);
  1742.         SetPlayerVirtualWorld(targetid, vw);
  1743.         SetPlayerInterior(targetid, interior);
  1744.     }
  1745.     else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1746.     return 1;
  1747. }
  1748.  
  1749. //____________________________________________________________
  1750.  
  1751.  
  1752. //___________________PLAYER COMMANDS_____________________
  1753. CMD:sendtols(playerid, params[])
  1754. {
  1755.     new id;
  1756.  
  1757.     if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
  1758.     if(sscanf(params,"u", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sendtols [playerid/PartOfName]");
  1759.     if(id != INVALID_PLAYER_ID)
  1760.     {
  1761.         PlayerInfo[id][pInt] = 0;
  1762.         SetPlayerInterior(id, 0);
  1763.         SetPlayerVirtualWorld(id, 0);
  1764.         SetPlayerPos(id, 1529.6, -1691.2, 13.3);
  1765.         SendClientMessage(id, COLOR_GRAD1, "   You have been teleported !");
  1766.     }
  1767.     else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");
  1768.     return 1;
  1769. }
  1770.  
  1771. CMD:stats(playerid, params[])
  1772. {
  1773.     new long_string[400];
  1774.     strcat(long_string, "/stats command is bugged, our scripters are going to fix it soon.");
  1775.     ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Stats", long_string, "CANCEL", "");
  1776.     return 1;
  1777. }
  1778.  
  1779. CMD:kill(playerid, params[])
  1780. {
  1781.     SetPlayerHealth(playerid, 0);
  1782.     ResetPlayerWeapons(playerid);
  1783.     return 1;
  1784. }
  1785.  
  1786.  
  1787. CMD:id(playerid, params[])
  1788. {
  1789.     new string[128], giveplayerid;
  1790.  
  1791.     if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /id [playerid]");
  1792.  
  1793.     if(IsPlayerConnected(giveplayerid))
  1794.     {
  1795.         format(string, sizeof(string), "(ID: %d) - (Name: %s) - (Level: %d) - (Ping: %d)", giveplayerid, GetName(giveplayerid),  PlayerInfo[giveplayerid][pLevel], GetPlayerPing(giveplayerid));
  1796.         SendClientMessage(playerid, COLOR_WHITE, string);
  1797.     }
  1798.     else
  1799.     {
  1800.         SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified !");
  1801.     }
  1802.     return 1;
  1803. }
  1804.  
  1805. CMD:time(playerid, params[])
  1806. {
  1807.     new string[128];
  1808.     new mtext[20];
  1809.     new year, month,day;
  1810.     getdate(year, month, day);
  1811.  
  1812.     if(month == 1) { mtext = "January"; }
  1813.     else if(month == 2) { mtext = "February"; }
  1814.     else if(month == 3) { mtext = "March"; }
  1815.     else if(month == 4) { mtext = "April"; }
  1816.     else if(month == 5) { mtext = "May"; }
  1817.     else if(month == 6) { mtext = "June"; }
  1818.     else if(month == 7) { mtext = "July"; }
  1819.     else if(month == 8) { mtext = "August"; }
  1820.     else if(month == 9) { mtext = "September"; }
  1821.     else if(month == 10) { mtext = "October"; }
  1822.     else if(month == 11) { mtext = "November"; }
  1823.     else if(month == 12) { mtext = "December"; }
  1824.     new hour,minuite,second;
  1825.     gettime(hour,minuite,second);
  1826.     FixHour(hour);
  1827.     hour = shifthour;
  1828.     if(minuite < 10)
  1829.     {
  1830.         format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
  1831.     }
  1832.     else
  1833.     {
  1834.         format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
  1835.     }
  1836.     if(!IsPlayerInAnyVehicle(playerid))
  1837.     {
  1838.         GameTextForPlayer(playerid, string, 5000, 1);
  1839.         ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch",4.0,0,0,0,0,0);
  1840.     }
  1841.     else
  1842.     {
  1843.         GameTextForPlayer(playerid, string, 5000, 1);
  1844.     }
  1845.     return 1;
  1846. }
  1847.  
  1848.  
  1849. CMD:pay(playerid, params[])
  1850. {
  1851.     new
  1852.     iTargetID, iCashAmount;
  1853.  
  1854.  
  1855.     if(sscanf(params, "ui", iTargetID, iCashAmount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pay [playerid] [amount]");
  1856.  
  1857.     if(iTargetID == playerid)
  1858.     {
  1859.         SendClientMessage(playerid, COLOR_GRAD1, "You can not use this command on yourself !");
  1860.         return 1;
  1861.     }
  1862.     if(iCashAmount > 1000 && PlayerInfo[playerid][pLevel] < 2)
  1863.     {
  1864.         SendClientMessage(playerid, COLOR_GRAD1, "You must be level 2 to pay over $1,000 !");
  1865.         return 1;
  1866.     }
  1867.     if(iCashAmount < 1 || iCashAmount > 10000)
  1868.     {
  1869.         SendClientMessage(playerid, COLOR_GRAD1, "Don't go below $1, or above $10,000 at once !");
  1870.         return 1;
  1871.     }
  1872.     if (IsPlayerConnected(iTargetID))
  1873.     {
  1874.         if (ProxDetectorS(5.0, playerid, iTargetID))
  1875.         {
  1876.             new
  1877.             string[128], giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], playermoney = server_GetCash(playerid);
  1878.  
  1879.             giveplayer = GetName(iTargetID);
  1880.             sendername = GetName(playerid);
  1881.             if(server_GetCash(playerid) < playermoney) return SendClientMessage(playerid, COLOR_GRAD1, "   Invalid transaction amount.");
  1882.             else
  1883.             {
  1884.                 server_GiveCash(playerid, -iCashAmount);
  1885.                 server_GiveCash(iTargetID, iCashAmount);
  1886.                 format(string, sizeof(string), "   You have paid $%d to %s.", iCashAmount, GetName(iTargetID));
  1887.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1888.                 SendClientMessage(playerid, COLOR_GRAD1, string);
  1889.                 format(string, sizeof(string), "   You have recieved $%d from %s.", iCashAmount, GetName(playerid));
  1890.                 SendClientMessage(iTargetID, COLOR_GRAD1, string);
  1891.                 new ip[32], ipex[32];
  1892.                 new i_dateTime[2][3];
  1893.                 gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
  1894.                 getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
  1895.                 GetPlayerIp(playerid, ip, sizeof(ip));
  1896.                 GetPlayerIp(iTargetID, ipex, sizeof(ipex));
  1897.                 format(string, sizeof(string), "[%i/%i/%i - %i:%i:%i] %s (IP:%s) has paid $%d to %s (IP:%s)", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], GetName(playerid), ip, iCashAmount, GetName(iTargetID), ipex);
  1898.                 PayLog(string);
  1899.  
  1900.                 if(PlayerInfo[playerid][pAdmin] >= 2)
  1901.                 {
  1902.                     format(string, sizeof(string), "[Admin] %s (IP:%s) has paid $%d to %s (IP:%s)", GetName(playerid), ip, iCashAmount, GetName(iTargetID), ipex);
  1903.                     format(string, sizeof(string), "AdmWarning: %s (IP:%s) has paid $%d to %s (IP:%s)", GetName(playerid), ip, iCashAmount, GetName(iTargetID), ipex);
  1904.                     ABroadCast(COLOR_YELLOW, string, 2);
  1905.                 }
  1906.  
  1907.                 PayWarn[playerid][iTargetID] += iCashAmount;
  1908.                 if(PayWarn[playerid][iTargetID] >= 100000 && PlayerInfo[playerid][pLevel] <= 3)
  1909.                 {
  1910.                     format(string, sizeof(string), "%s (IP:%s) has paid %s (IP:%s) $%d in this session.", GetName(playerid), ip, GetName(iTargetID), ipex, PayWarn[playerid][iTargetID]);
  1911.                     ABroadCast(COLOR_YELLOW, string, 2);
  1912.                 }
  1913.  
  1914.                 if(iCashAmount >= 1000000)
  1915.                 {
  1916.                     ABroadCast(COLOR_YELLOW,string,2);
  1917.                 }
  1918.  
  1919.                 PlayerPlaySound(iTargetID, 1052, 0.0, 0.0, 0.0);
  1920.                 format(string, sizeof(string), "* %s takes out some cash, and hands it to %s.", GetName(playerid) ,GetName(iTargetID));
  1921.                 ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1922.             }
  1923.         }
  1924.         else
  1925.         {
  1926.             SendClientMessage(playerid, COLOR_GREY, "That player isn't near you.");
  1927.         }
  1928.     }
  1929.     else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
  1930.     return 1;
  1931. }
  1932.  
  1933. CMD:togwhisper(playerid, params[])
  1934. {
  1935.     if (!HidePM[playerid])
  1936.     {
  1937.         HidePM[playerid] = 1;
  1938.         SendClientMessage(playerid, COLOR_GRAD2, "You have disabled whisper chat !");
  1939.     }
  1940.     else
  1941.     {
  1942.         HidePM[playerid] = 0;
  1943.         SendClientMessage(playerid, COLOR_GRAD2, "You have enabled whisper chat !");
  1944.     }
  1945.     return 1;
  1946. }
  1947.  
  1948. CMD:low(playerid, params[]) {
  1949.     return cmd_l(playerid, params);
  1950. }
  1951.  
  1952. CMD:l(playerid, params[])
  1953. {
  1954.     if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/l)ow [quiet chat]");
  1955.  
  1956.     new string[128];
  1957.     format(string, sizeof(string), "%s says quietly: %s", GetName(playerid), params);
  1958.     ProxDetector(5.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  1959.     format(string, sizeof(string), "(quietly) %s", params);
  1960.     SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000);
  1961.     return 1;
  1962. }
  1963.  
  1964. CMD:w(playerid, params[]) {
  1965.     return cmd_whisper(playerid, params);
  1966. }
  1967.  
  1968. CMD:whisper(playerid, params[])
  1969. {
  1970.     new giveplayerid, whisper[128];
  1971.  
  1972.     if(sscanf(params, "us[128]", giveplayerid, whisper))
  1973.     {
  1974.         SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/w)hisper [playerid] [message]");
  1975.         return 1;
  1976.     }
  1977.     if (IsPlayerConnected(giveplayerid))
  1978.     {
  1979.         if(HidePM[giveplayerid] > 0)
  1980.         {
  1981.             SendClientMessage(playerid, COLOR_GREY, "That player is blocking whispers!");
  1982.             return 1;
  1983.         }
  1984.         new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[128];
  1985.         sendername = GetName(playerid);
  1986.         giveplayer = GetName(giveplayerid);
  1987.         if(ProxDetectorS(5.0, playerid, giveplayerid) || PlayerInfo[playerid][pAdmin] >= 2)
  1988.         {
  1989.             format(string, sizeof(string), "%s(ID: %d) whispers: %s", GetName(playerid), playerid, whisper);
  1990.             SendClientMessage(giveplayerid,COLOR_YELLOW, string);
  1991.  
  1992.             format(string, sizeof(string), "Whisper to %s(ID: %d): %s", GetName(giveplayerid), giveplayerid, whisper);
  1993.             SendClientMessage(playerid,COLOR_YELLOW, string);
  1994.             return 1;
  1995.         }
  1996.         else
  1997.         {
  1998.             SendClientMessage(playerid, COLOR_GREY, "That player isn't near you !");
  1999.         }
  2000.         return 1;
  2001.     }
  2002.     else
  2003.     {
  2004.         SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified !");
  2005.     }
  2006.     return 1;
  2007. }
  2008.  
  2009. CMD:me(playerid, params[])
  2010. {
  2011.  
  2012.     new string[128];
  2013.     if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: /me [action]");
  2014.     format(string, sizeof(string), "* %s %s", GetName(playerid), params);
  2015.     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  2016.     return 1;
  2017. }
  2018.  
  2019. CMD:do(playerid, params[])
  2020. {
  2021.     new string[128];
  2022.  
  2023.     if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: /do [local chat]");
  2024.     format(string, sizeof(string), "* %s (( %s ))", params, GetName(playerid));
  2025.     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  2026.     return 1;
  2027. }
  2028.  
  2029. CMD:s(playerid,params[])
  2030. {
  2031.     new string[128];
  2032.  
  2033.     if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: (/s)hout [local chat]");
  2034.     format(string, sizeof(string), "%s shouts: %s!", GetName(playerid), params);
  2035.     ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
  2036.     return 1;
  2037. }
  2038.  
  2039. CMD:shout(playerid, params[]) return cmd_s(playerid, params);
  2040.  
  2041. CMD:b(playerid,params[])
  2042. {
  2043.  
  2044.     new string[128];
  2045.     if(isnull(params)) return SendClientMessage(playerid, -1,"USAGE: /b [local ooc]");
  2046.     format(string, sizeof(string), "%s: (( %s ))", GetName(playerid), params);
  2047.     ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  2048.     return 1;
  2049. }
  2050.  
  2051. CMD:ooc(playerid, params[])
  2052. {
  2053.     new string[160];
  2054.  
  2055.     if(isnull(params)) return SendClientMessage(playerid, -1,"USAGE: /ooc [chat]");
  2056.     if ((noooc) && PlayerInfo[playerid][pAdmin] < 1 && gOOC[playerid] == 0)
  2057.     {
  2058.         SendClientMessage(playerid, COLOR_GREY, "The OOC channel has been disabled by an Admin !");
  2059.         return 1;
  2060.     }
  2061.     else
  2062.     {
  2063.         format(string,160,"(( %s: %s ))", GetName(playerid), params);
  2064.         printf("(( %s: %s ))", GetName(playerid), string);
  2065.         OOCOff(COLOR_OOC,string);
  2066.     }
  2067.     if(gOOC[playerid] == 1)
  2068.     {
  2069.         SendClientMessage(playerid, COLOR_GREY, "You have the channel toggled, /togooc to re-enable!");
  2070.         return 1;
  2071.     }
  2072.     return 1;
  2073. }
  2074.  
  2075. CMD:o(playerid, params[]) return cmd_ooc(playerid, params);
  2076. //___________________________________________________
  2077. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  2078. {
  2079.     if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: Invalid command, please use the available commands in /cmds.");
  2080.     else if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "You're not logged in."); }
  2081.     return 1;
  2082. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement