Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //The Corners of Los Santos RPG
- #include <a_samp>
- #include <sscanf2>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <foreach>
- #include <streamer>
- #include <Dini>
- #include <basicssm>
- #define WEAPON_PATH "Weapons"
- #define PATH "/Users/%s.ini"
- #define FILE_TABLICA "news.txt"
- #define NOTADMIN "You are not authorized to use this command!"
- #define COL_WHITE "{FFFFFF}"
- #define COL_YELLOW "{F3FF02}"
- #define COL_RED "{F81414}"
- #define ResetMoneyBar ResetPlayerMoney
- #define UpdateMoneyBar GivePlayerMoney
- #define SCM SendClientMessage
- #define COLOR_BITEM 0xE1B0B0FF
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_BLACK 0x000001FF
- #define COLOR_BLUE 0x007BD0FF
- #define COLOR_LIGHTORANGE 0xFFA100FF
- #define COLOR_FLASH 0xFF000080
- #define COLOR_LIGHTRED 0xFF6347AA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_LIGHTGREEN 0x9ACD32AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_LIGHTYELLOW 0xFFFF91FF
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_DBLUE 0x2641FEAA
- #define COLOR_DOC 0xFF8282AA
- #define COLOR_DCHAT 0xF0CC00FF
- #define COLOR_NEWS 0xFFA500AA
- #define COLOR_OOC 0xE0FFFFAA
- #define TEAM_BLUE_COLOR 0x8D8DFF00
- #define TEAM_GROVE_COLOR 0x00AA00FF
- #define TEAM_AZTECAS_COLOR 0x01FCFFC8
- #define NEWBIE_COLOR 0x7DAEFFFF
- #define SAMP_COLOR 0xAAC4E5FF
- #define ResetMoneyBar ResetPlayerMoney
- #define UpdateMoneyBar GivePlayerMoney
- new Text:Textdraw0,
- Text:Textdraw1,
- Text:Textdraw2,
- Text:Textdraw3,
- Text:Textdraw4,
- Text:Textdraw5,
- Text:textdraw6;
- forward Odswiez();
- public Odswiez()
- {
- new tablica[466];
- new File:Aktualnosci = fopen(""FILE_TABLICA"", io_read);
- fread(Aktualnosci, tablica);
- fclose(Aktualnosci);
- TextDrawSetString(Textdraw1, tablica);
- return 1;
- }
- forward blood(playerid);
- public blood(playerid)
- {
- new Float:HP;
- GetPlayerHealth(playerid,HP);
- if(HP <= 10)
- {
- GameTextForPlayer(playerid,"~w~You are injured!",2000,6);
- TextDrawShowForPlayer(playerid,textdraw6);
- }
- else
- {
- TextDrawHideForPlayer(playerid,textdraw6);
- }
- }
- public MoneyTimer()
- {
- new username[MAX_PLAYER_NAME];
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(server_GetCash(i) != GetPlayerMoney(i))
- {
- ResetMoneyBar(i);
- UpdateMoneyBar(i,server_GetCash(i));
- new hack = server_GetCash(i) - server_GetCash(i);
- GetPlayerName(i,username,sizeof(username));
- }
- }
- }
- }
- new bool:AlreadyGiveWeapons[MAX_PLAYERS];
- SaveWeaponsToFile(playerid)
- {
- new i, path[50], string[128], weaponid, ammo;
- path = GetPlayerFormattedName(playerid);
- if (!dini_Exists(path)) dini_Create(path);
- for (i=0; i<13; i++)
- {
- GetPlayerWeaponData(playerid,i,weaponid,ammo);
- format(string,sizeof(string),"Weapon - %d",i);
- dini_IntSet(path,string,weaponid);
- format(string,sizeof(string),"AmmoID - %d",i);
- dini_IntSet(path,string,ammo == 65535 ? 0 : ammo);
- }
- }
- forward LoadWeaponsToFile(playerid);
- public LoadWeaponsToFile(playerid)
- {
- new i, path[50], string[128], weaponid, ammo;
- path = GetPlayerFormattedName(playerid);
- ResetPlayerWeapons(playerid);
- for (i=0; i<13; i++)
- {
- format(string,sizeof(string),"Weapon - %d",i);
- weaponid = dini_Int(path,string);
- format(string,sizeof(string),"AmmoID - %d",i);
- ammo = dini_Int(path,string);
- GivePlayerWeapon(playerid,weaponid,ammo);
- }
- AlreadyGiveWeapons[playerid] = true;
- }
- GetPlayerFormattedName(playerid)
- {
- new name[24], full[50];
- GetPlayerName(playerid,name,sizeof(name));
- format(full,sizeof(full),"%s/%s.txt",WEAPON_PATH,name);
- return full;
- }
- forward payday(playerid);
- public payday(playerid)
- {
- new hh, mm, ss;
- gettime( hh, mm, ss );
- if( mm == 0 )
- {
- for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
- {
- new string[128];
- new RandomPay = random(1000 - 400) + 100;// new RandomPay = random(MAX - MIN) + MIN;
- server_GiveCash( playerid, RandomPay );
- SendClientMessage(playerid, COLOR_WHITE,"---PAYCHECK---");
- format(string, sizeof(string), "Your earnings: $%i", RandomPay);
- SendClientMessage(i, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE,"-------------------------");
- }
- }
- return 1;
- }
- //Fowards
- forward split(const strsrc[], strdest[][], delimiter);
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- forward ProxDetectorS(Float:radi, playerid, targetid);
- forward LoadUser_data(playerid,name[],value[]);
- forward SaveAccountInfo(playerid);
- forward OOCOff(color,const string[]);
- forward FixHour(hour);
- forward IsValidName(playerid);
- //Forwarded Logs
- forward PayLog(string[]);
- forward BanLog(string[]);
- forward KickLog(string[]);
- //-------------------------------------
- //Variables
- new gPlayerLogged[MAX_PLAYERS char];
- new gAdminAuthorized[MAX_PLAYERS];
- new gOOC[MAX_PLAYERS];
- new HidePM[MAX_PLAYERS];
- new PayWarn[MAX_PLAYERS][MAX_PLAYERS];
- new noooc = 0;
- new realchat = 1;
- new timeshift = -1;
- new shifthour;
- //-----------------------------
- enum pInfo
- {
- pPass,
- pCash,
- pSkin,
- pLevel,
- pInt,
- pVW,
- pAdmin,
- pSecKey,
- pKills,
- pDeaths,
- Float:pFacingAngle,
- Float:pHealth,
- Float:pArmour,
- Float:pLastX,
- Float:pLastY,
- Float:pLastZ
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- //Fowarded Public Functions
- public PayLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("pay.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public KickLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("kick.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public BanLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("ban.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public IsValidName(playerid)
- {
- new pname[MAX_PLAYER_NAME],underline=0;
- GetPlayerName(playerid, pname, sizeof(pname));
- if(strfind(pname,"[",true) != (-1)) return 0;
- else if(strfind(pname,".",true) != (-1)) return 0;
- else if(strfind(pname,"]",true) != (-1)) return 0;
- else if(strfind(pname,"$",true) != (-1)) return 0;
- else if(strfind(pname,"(",true) != (-1)) return 0;
- else if(strfind(pname,")",true) != (-1)) return 0;
- else if(strfind(pname,"=",true) != (-1)) return 0;
- else if(strfind(pname,"@",true) != (-1)) return 0;
- else if(strfind(pname,"1",true) != (-1)) return 0;
- else if(strfind(pname,"2",true) != (-1)) return 0;
- else if(strfind(pname,"3",true) != (-1)) return 0;
- else if(strfind(pname,"4",true) != (-1)) return 0;
- else if(strfind(pname,"5",true) != (-1)) return 0;
- else if(strfind(pname,"6",true) != (-1)) return 0;
- else if(strfind(pname,"7",true) != (-1)) return 0;
- else if(strfind(pname,"8",true) != (-1)) return 0;
- else if(strfind(pname,"9",true) != (-1)) return 0;
- new maxname = strlen(pname);
- for(new i=0; i<maxname; i++) { if(pname[i] == '_') underline ++; }
- if(underline != 1) return 0;
- pname[0] = toupper(pname[0]);
- for(new x=1; x<maxname; x++)
- {
- if(pname[x] == '_') pname[x+1] = toupper(pname[x+1]);
- else if(pname[x] != '_' && pname[x-1] != '_') pname[x] = tolower(pname[x]);
- }
- return 1;
- }
- public ProxDetectorS(Float:radi, playerid, targetid)
- {
- if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- GetPlayerPos(targetid, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- public FixHour(hour)
- {
- hour = timeshift+hour;
- if(hour < 0) { hour = hour+24; }
- else if(hour > 23) { hour = hour-24; }
- shifthour = hour;
- return 1;
- }
- public OOCOff(color,const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!gOOC[i])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- new playerworld, player2world;
- playerworld = GetPlayerVirtualWorld(playerid);
- player2world = GetPlayerVirtualWorld(i);
- if(playerworld == player2world)
- {
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- }
- return 1;
- }
- public SaveAccountInfo(playerid)
- {
- new cash = server_GetCash(playerid);
- new skin = GetPlayerSkin(playerid);
- new level = GetPlayerScore(playerid);
- new int = GetPlayerInterior(playerid);
- new vw = GetPlayerVirtualWorld(playerid);
- new Float:X, Float:Y, Float:Z;
- new Float:facingangle;
- new Float:health, Float:armour;
- GetPlayerHealth(playerid, health);
- GetPlayerArmour(playerid, armour);
- GetPlayerFacingAngle(playerid, facingangle);
- GetPlayerPos(playerid, X, Y, Z);
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",cash);
- INI_WriteInt(File,"Skin",skin);
- INI_WriteInt(File,"Level",level);
- INI_WriteInt(File,"Int",int);
- INI_WriteInt(File,"VW",vw);
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"SecKey",PlayerInfo[playerid][pSecKey]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteFloat(File, "FacingAngle", facingangle);
- INI_WriteFloat(File, "Health", health);
- INI_WriteFloat(File, "Armour", armour);
- INI_WriteFloat(File, "LastX", X);
- INI_WriteFloat(File, "LastY", Y);
- INI_WriteFloat(File, "LastZ", Z);
- INI_Close(File);
- return 1;
- }
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Skin",PlayerInfo[playerid][pSkin]);
- INI_Int("Level",PlayerInfo[playerid][pLevel]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("SecKey",PlayerInfo[playerid][pSecKey]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Float("FacingAngle",PlayerInfo[playerid][pFacingAngle]);
- INI_Float("Health",PlayerInfo[playerid][pHealth]);
- INI_Float("Armour",PlayerInfo[playerid][pArmour]);
- INI_Float("LastX", PlayerInfo[playerid][pLastX]);
- INI_Float("LastY", PlayerInfo[playerid][pLastY]);
- INI_Float("LastZ", PlayerInfo[playerid][pLastZ]);
- return 1;
- }
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- //STOCKS
- stock ABroadCast(color,string[],level)
- {
- foreach(Player, i)
- {
- if (PlayerInfo[i][pAdmin] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- return 1;
- }
- stock GetPlayerFirstName(playerid)
- {
- new namestring[2][MAX_PLAYER_NAME];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- split(name, namestring, '_');
- return namestring[0];
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- stock strreplace(string[], find, replace)
- {
- for(new i=0; string[i]; i++)
- {
- if(string[i] == find)
- {
- string[i] = replace;
- }
- }
- }
- stock GetName(playerid)
- {
- new
- name[24];
- GetPlayerName(playerid, name, sizeof(name));
- strreplace(name, '_', ' ');
- return name;
- }
- //--------------------------------------------------
- main()
- {
- print("\n----------------------------------");
- print("* TCoLS Roleplay load sucessfully....");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- ManualVehicleEngineAndLights();
- SetTimer("payday", 60000, 1);
- SetTimer("MoneyTimer", 1000, 1);
- SetGameModeText("TCoLS RPG v1.1");
- SetNameTagDrawDistance(10.0);
- AllowInteriorWeapons(1);
- ShowPlayerMarkers(0);
- EnableStuntBonusForAll(0);
- DisableInteriorEnterExits();
- AddPlayerClass(24, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(25, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(105, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(106, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(104, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(107, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(108, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(102, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(103, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(110, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(111, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(5, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(173, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(174, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(270, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(271, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(292, 2492.878417, -1750.079589, 13.495314, 90.0, 0, 0, 0, 0, 0, 0);
- // Bloodtextdraw
- textdraw6 = TextDrawCreate(306.000000, -2.000000, ".");
- TextDrawAlignment(textdraw6, 2);
- TextDrawBackgroundColor(textdraw6, 255);
- TextDrawFont(textdraw6, 1);
- TextDrawLetterSize(textdraw6, 0.889999, 51.199993);
- TextDrawColor(textdraw6, -1);
- TextDrawSetOutline(textdraw6, 0);
- TextDrawSetProportional(textdraw6, 1);
- TextDrawSetShadow(textdraw6, 1);
- TextDrawUseBox(textdraw6, 1);
- TextDrawBoxColor(textdraw6, -1207959526);
- TextDrawTextSize(textdraw6, 29.000000, 664.000000);
- // Tablica
- Textdraw0 = TextDrawCreate(511.000000,211.000000,"News:");
- Textdraw1 = TextDrawCreate(497.000000,228.000000,"Loaded");
- Textdraw2 = TextDrawCreate(636.000000,227.000000,"_");
- Textdraw3 = TextDrawCreate(641.000000,212.000000,"_");
- Textdraw4 = TextDrawCreate(495.000000,218.000000,"~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~---~r~---~b~-");
- Textdraw5 = TextDrawCreate(641.000000,316.000000,"_");
- TextDrawUseBox(Textdraw2,1);
- TextDrawBoxColor(Textdraw2,0x00000033);
- TextDrawTextSize(Textdraw2,492.000000,22.000000);
- TextDrawUseBox(Textdraw3,1);
- TextDrawBoxColor(Textdraw3,0x00000033);
- TextDrawTextSize(Textdraw3,486.000000,-1.000000);
- TextDrawUseBox(Textdraw5,1);
- TextDrawBoxColor(Textdraw5,0x00000033);
- TextDrawTextSize(Textdraw5,487.000000,0.000000);
- TextDrawAlignment(Textdraw0,0);
- TextDrawAlignment(Textdraw1,0);
- TextDrawAlignment(Textdraw2,0);
- TextDrawAlignment(Textdraw3,0);
- TextDrawAlignment(Textdraw4,0);
- TextDrawAlignment(Textdraw5,0);
- TextDrawBackgroundColor(Textdraw0,0x00000033);
- TextDrawBackgroundColor(Textdraw1,0x000000ff);
- TextDrawBackgroundColor(Textdraw2,0x000000ff);
- TextDrawBackgroundColor(Textdraw3,0x000000ff);
- TextDrawBackgroundColor(Textdraw4,0x000000ff);
- TextDrawBackgroundColor(Textdraw5,0x000000ff);
- TextDrawFont(Textdraw0,1);
- TextDrawLetterSize(Textdraw0,0.699999,1.000000);
- TextDrawFont(Textdraw1,1);
- TextDrawLetterSize(Textdraw1,0.199999,1.000000);
- TextDrawFont(Textdraw2,3);
- TextDrawLetterSize(Textdraw2,1.000000,9.400001);
- TextDrawFont(Textdraw3,3);
- TextDrawLetterSize(Textdraw3,1.000000,1.200000);
- TextDrawFont(Textdraw4,3);
- TextDrawLetterSize(Textdraw4,0.199999,1.200000);
- TextDrawFont(Textdraw5,3);
- TextDrawLetterSize(Textdraw5,1.000000,1.000000);
- TextDrawColor(Textdraw0,0xffff00ff);
- TextDrawColor(Textdraw1,0xffffffff);
- TextDrawColor(Textdraw2,0xffffffff);
- TextDrawColor(Textdraw3,0xffffffff);
- TextDrawColor(Textdraw4,0xffffffff);
- TextDrawColor(Textdraw5,0xffffffff);
- TextDrawSetOutline(Textdraw0,1);
- TextDrawSetOutline(Textdraw1,1);
- TextDrawSetOutline(Textdraw2,1);
- TextDrawSetOutline(Textdraw3,1);
- TextDrawSetOutline(Textdraw4,1);
- TextDrawSetOutline(Textdraw5,1);
- TextDrawSetProportional(Textdraw0,1);
- TextDrawSetProportional(Textdraw1,1);
- TextDrawSetProportional(Textdraw2,1);
- TextDrawSetProportional(Textdraw3,1);
- TextDrawSetProportional(Textdraw4,1);
- TextDrawSetProportional(Textdraw5,1);
- TextDrawSetShadow(Textdraw0,1);
- TextDrawSetShadow(Textdraw1,1);
- TextDrawSetShadow(Textdraw2,1);
- TextDrawSetShadow(Textdraw3,1);
- TextDrawSetShadow(Textdraw4,1);
- TextDrawSetShadow(Textdraw5,1);
- new tablica[466];
- new File:Aktualnosci = fopen(""FILE_TABLICA"", io_read);
- fread(Aktualnosci, tablica);
- fclose(Aktualnosci);
- TextDrawSetString(Textdraw1, tablica);
- SetTimer("Odswiez", 6000, true);
- //3DTEXTS
- Create3DTextLabel("Trucker Job\nEnter the truck and /petrol.", COLOR_WHITE, 2070.7717, -1939.3361, 13.5469, 40, 0); //trucker
- Create3DTextLabel("Courier Job\nEnter the truck and /courier.", COLOR_WHITE, 1615.8240, -1842.1359, 13.5307, 40, 0); //courier
- Create3DTextLabel("Pizza Boy Job\nEnter the pizzaboy and /pizza.", COLOR_WHITE, 2113.8711, -1786.4855, 13.5608, 40, 0); //pizzaboy
- Create3DTextLabel("Sweeper Job\nEnter the sweeper and /sweeper.", COLOR_WHITE, 1434.9597, -1845.5957, 13.5469, 40, 0); //sweeper
- Create3DTextLabel("Farmer Job\nEnter the harvester and /harvest.", COLOR_WHITE, -481.2557, -1458.7404, 15.3066, 40, 0); //farmer
- //OBJECTS
- CreateObject(11674,2497.76367188,-1759.74609375,12.43701935,0.00000000,0.00000000,218.49609375); //object(des_cluckin) (1)
- CreateObject(1280,2499.74365234,-1751.33862305,12.84823227,0.00000000,0.00000000,270.25000000); //object(parkbench1) (2)
- CreateObject(640,2487.71337891,-1753.13659668,13.39390659,0.00000000,0.00000000,180.00000000); //object(kb_planter_bush2) (1)
- CreateObject(640,2487.68530273,-1748.09777832,13.39390659,0.00000000,0.00000000,179.99450684); //object(kb_planter_bush2) (2)
- CreateObject(1280,2503.14257812,-1751.29687500,12.84823227,0.00000000,0.00000000,270.24719238); //object(parkbench1) (3)
- CreateObject(1280,2496.34277344,-1751.36230469,12.84823227,0.00000000,0.00000000,270.24719238); //object(parkbench1) (4)
- CreateObject(1496,2497.55639648,-1752.12719727,12.49540615,0.00000000,0.00000000,269.75000000); //object(gen_doorshop02) (1)
- CreateObject(1496,2497.54321289,-1755.11230469,12.49540615,0.00000000,0.00000000,89.74731445); //object(gen_doorshop02) (2)
- CreateObject(3005,2505.81103516,-1750.53759766,12.54650497,0.00000000,0.00000000,0.00000000); //object(smash_box_stay) (1)
- CreateObject(3006,2505.81054688,-1750.53710938,12.52446461,0.00000000,0.00000000,0.00000000); //object(smash_box_brk) (2)
- CreateObject(2968,2506.58520508,-1749.65698242,12.87935925,0.00000000,0.00000000,149.99633789); //object(cm_box) (3)
- CreateObject(1409,2488.86254883,-1754.46362305,12.54687500,0.00000000,0.00000000,1.50000000); //object(cj_dump1_low) (1)
- CreateObject(2670,2503.93847656,-1750.41503906,12.47486496,0.00000000,0.00000000,0.00000000); //object(proc_rubbish_1) (1)
- CreateObject(2670,2489.17919922,-1753.72814941,12.54986763,0.75000000,0.00000000,332.00000000); //object(proc_rubbish_1) (2)
- CreateObject(2673,2498.14965820,-1751.66198730,12.47064018,0.00000000,0.00000000,146.00000000); //object(proc_rubbish_5) (1)
- CreateObject(2675,2488.04492188,-1754.71838379,12.48614597,0.00000000,0.00000000,152.00000000); //object(proc_rubbish_6) (1)
- CreateObject(1449,2488.96826172,-1747.88391113,12.90446663,316.00219727,0.69506836,91.73284912); //object(dyn_crate_2) (1)
- CreateObject(1449,2489.17529297,-1748.03393555,12.45446587,285.03027344,3.85873413,94.97570801); //object(dyn_crate_2) (2)
- CreateObject(1450,2486.16650391,-1745.85473633,12.77170277,351.49804688,0.50341797,273.82397461); //object(dyn_crate_3) (2)
- CreateObject(2770,2494.37597656,-1754.60241699,13.09481144,0.00000000,0.00000000,293.50000000); //object(cj_cb_bin) (2)
- CreateObject(2601,2488.87280273,-1754.46484375,13.73025417,0.00000000,0.00000000,262.00000000); //object(cj_juice_can) (1)
- CreateObject(1492,2494.98608398,-1752.80114746,12.38281250,0.00000000,0.00000000,270.00000000); //object(gen_doorint02) (1)
- CreateObject(1230,2488.88330078,-1746.21520996,12.80175495,0.00000000,0.00000000,92.00000000); //object(cardboardbox) (1)
- CreateObject(3119,2488.01562500,-1744.49682617,12.68667030,0.00000000,0.00000000,185.75000000); //object(cs_ry_props) (1)
- CreateObject(16096,2491.14013672,-1757.83105469,14.28713799,0.00000000,0.00000000,0.00000000); //object(des_a51guardbox04) (1)
- //Pizza Stack Idlewood//
- CreateObject(1319,1937.1999500,-2145.1999500,-8.5000000,0.0000000,0.0000000,0.0000000); //object(ws_ref_bollard) (10)
- CreateObject(2957,2128.6999500,-1781.5000000,14.0000000,0.0000000,0.0000000,90.0000000); //object(chinatgaragedoor) (1)
- CreateObject(1616,2128.6999500,-1785.0000000,16.4000000,0.0000000,0.0000000,0.0000000); //object(nt_securecam1_01) (2)
- CreateObject(983,2123.6999500,-1769.5000000,13.1000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (1)
- CreateObject(983,2123.6999500,-1775.9000200,13.1000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (2)
- CreateObject(983,2120.3999000,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (3)
- CreateObject(983,2114.0000000,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (4)
- CreateObject(983,2107.6001000,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (5)
- CreateObject(983,2101.1999500,-1786.0000000,13.1000000,0.0000000,0.0000000,90.0000000); //object(fenceshit3) (6)
- CreateObject(994,2092.6001000,-1791.0999800,12.4000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (1)
- CreateObject(994,2099.1999500,-1819.9000200,12.4000000,0.0000000,0.0000000,90.0000000); //object(lhouse_barrier2) (2)
- CreateObject(994,2092.1999500,-1811.6999500,12.5000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (3)
- CreateObject(994,2092.5000000,-1802.2998000,12.4000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (4)
- CreateObject(994,2092.1999500,-1822.3000500,12.4000000,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier2) (5)
- CreateObject(994,2099.0000000,-1799.8994100,12.4000000,0.0000000,0.0000000,90.0000000); //object(lhouse_barrier2) (6)
- CreateObject(983,2123.6999500,-1763.0999800,13.1000000,0.0000000,0.0000000,0.0000000); //object(fenceshit3) (7)
- CreateObject(3260,2105.5000000,-1823.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (1)
- CreateObject(3260,2105.5000000,-1825.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (2)
- CreateObject(3260,2105.5000000,-1827.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (3)
- CreateObject(3260,2105.5000000,-1829.3000500,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (4)
- CreateObject(3260,2105.5000000,-1830.9000200,13.5000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (5)
- CreateObject(3260,2128.6001000,-1787.0000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (6)
- CreateObject(3260,2128.6001000,-1789.0000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (7)
- CreateObject(3260,2128.6001000,-1791.0000000,13.6000000,0.0000000,0.0000000,270.0000000); //object(oldwoodpanel) (8)
- CreateObject(3260,2127.6001000,-1792.0000000,13.6000000,0.0000000,0.0000000,180.0000000); //object(oldwoodpanel) (9)
- CreateObject(3260,2125.6001000,-1792.0000000,13.6000000,0.0000000,0.0000000,179.9950000); //object(oldwoodpanel) (10)
- CreateObject(3260,2123.6001000,-1792.0000000,13.6000000,0.0000000,0.0000000,179.9950000); //object(oldwoodpanel) (11)
- //Jefferson Center
- CreateDynamicObject(1764,2303.8000488,-1433.9000244,23.0000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1754,2306.3999023,-1434.6999512,23.0000000,0.0000000,0.0000000,320.0000000); //
- CreateDynamicObject(1765,2302.6999512,-1436.8000488,23.0000000,0.0000000,0.0000000,120.0000000); //
- CreateDynamicObject(2291,2306.1999512,-1436.6999512,23.0000000,0.0000000,0.0000000,200.0000000); //
- CreateDynamicObject(1666,2305.3000488,-1435.8000488,23.6000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1666,2303.3999023,-1435.8000488,23.6000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1666,2305.1000977,-1435.0999756,23.6000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1544,2305.3000488,-1435.5000000,23.5000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1544,2303.6000977,-1434.5999756,23.0000000,90.0000000,35.0000000,0.0000000); //
- CreateDynamicObject(1543,2304.1000977,-1435.1999512,23.5000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1485,2304.0000000,-1435.0999756,23.5000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1485,2303.5000000,-1435.6999512,23.5000000,0.0000000,0.0000000,265.0000000); //
- CreateDynamicObject(1485,2305.3999023,-1435.9000244,23.5000000,0.0000000,0.0000000,170.0000000); //
- CreateDynamicObject(916,2302.3999023,-1434.0000000,23.1000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(916,2301.5000000,-1434.0999756,23.1000004,0.0000000,0.0000000,35.0000000); //
- CreateDynamicObject(928,2301.3000488,-1433.5999756,23.2999992,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(928,2300.6000977,-1432.9000244,23.2999992,0.0000000,0.0000000,72.0000000); //
- CreateDynamicObject(2670,2307.3000488,-1435.5000000,23.1000004,0.0000000,0.0000000,90.0000000); //
- CreateDynamicObject(2670,2313.8000488,-1438.6999512,20.2999992,0.0000000,0.0000000,50.0000000); //
- CreateDynamicObject(2670,2314.1999512,-1436.8000488,20.5000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2670,2315.1000977,-1438.9000244,20.2999992,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2670,2314.6000977,-1437.9000244,20.1000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1510,2303.5000000,-1435.5000000,23.5100002,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2663,2304.3999023,-1435.8000488,23.7999992,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2647,2304.0000000,-1435.8000488,23.7000008,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2647,2302.5000000,-1434.1999512,23.2999992,0.0000000,358.0000000,0.0000000); //
- CreateDynamicObject(2702,2302.1000977,-1434.0999756,23.1000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2703,2302.1999512,-1434.1999512,23.2999992,95.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2769,2305.1999512,-1435.1999512,23.5000000,0.0000000,0.0000000,50.0000000); //
- CreateDynamicObject(2840,2301.5000000,-1434.1000977,23.0000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2311,2303.6000977,-1435.5000000,23.0000000,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(983,2298.5000000,-1439.0000000,23.7000008,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(983,2298.5000000,-1434.1992188,23.7000008,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(983,2304.8999023,-1442.1999512,23.7000008,0.0000000,0.0000000,90.0000000); //
- CreateDynamicObject(983,2301.6992188,-1442.1992188,23.7000008,0.0000000,0.0000000,90.0000000); //
- CreateDynamicObject(3065,2300.6999512,-1441.4000244,23.1000004,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(1985,2300.1999512,-1439.6999512,26.0000000,0.0000000,357.9949951,0.0000000); //
- CreateDynamicObject(946,2300.1000977,-1440.5000000,25.2000008,0.0000000,0.0000000,270.0000000); //
- CreateDynamicObject(4227,2352.3999023,-1437.3000488,25.5000000,0.0000000,0.0000000,270.0000000); //
- CreateDynamicObject(1473,2310.8999023,-1439.0000000,22.9400005,0.0000000,0.0000000,104.9999695); //
- CreateDynamicObject(1472,2314.3999023,-1438.0999756,21.5000000,0.0000000,0.0000000,104.9999695); //
- CreateDynamicObject(1474,2312.3999023,-1438.5860596,21.2500000,0.0000000,0.0000000,106.0000000); //
- CreateDynamicObject(1470,2316.3000488,-1437.8000488,20.7999992,0.0000000,0.0000000,14.0000000); //
- CreateDynamicObject(1337,2314.6999512,-1439.1999512,20.5000000,90.0000000,0.0000000,45.0000000); //
- CreateDynamicObject(2102,2300.6999512,-1437.0899658,23.8299999,0.0000000,0.0000000,86.0000000); //
- CreateDynamicObject(2629,2304.3994141,-1440.8994141,23.0000000,0.0000000,0.0000000,177.9949951); //
- CreateDynamicObject(1481,2299.6000977,-1437.4000244,23.7000008,0.0000000,0.0000000,90.0000000); //
- CreateDynamicObject(1481,2300.0000000,-1436.0999756,23.7000008,0.0000000,0.0000000,50.0000000); //
- CreateDynamicObject(2121,2300.5000000,-1438.0999756,23.5000000,0.0000000,0.0000000,220.0000000); //
- CreateDynamicObject(2725,2300.5000000,-1437.0999756,23.3999996,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2822,2300.3999023,-1437.0999756,23.8999996,0.0000000,0.0000000,0.0000000); //
- CreateDynamicObject(2913,2304.8000488,-1441.4602051,23.8600006,0.0000000,270.0000000,358.0000000); //
- //VEHICLES
- //LSPD
- AddStaticVehicleEx(523,1585.2291,-1676.4011,5.4624,270.0000,-1,-1,900); //police bike
- AddStaticVehicleEx(523,1585.2291,-1679.0729,5.4607,270.0000,-1,-1,900); //police bike
- AddStaticVehicleEx(596,1583.3301,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
- AddStaticVehicleEx(598,1587.4896,-1710.1624,5.6129,0,-1,-1,900); //police lvpd car
- AddStaticVehicleEx(427,1558.7682,-1710.4094,6.0225,359.5701,-1,-1,900); //police enforcer
- AddStaticVehicleEx(596,1578.5399,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596,1574.4989,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596,1570.3170,-1710.1624,5.6129,0,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596,1535.7517,-1678.2754,15.0000,0,-1,-1,900); //police lspd car
- AddStaticVehicleEx(497,1549.5,-1644.1257,33.0,90.0,0,1,900); // Roof Chopper
- AddStaticVehicleEx(497,1549.5,-1707.3848,33.0,90.0,0,1,900); // Roof Chopper
- AddStaticVehicleEx(601,1564.4753,-1711.6448,5.6510,5.6801,-1,-1,900); //swat tank
- AddStaticVehicleEx(528,1558.0299,-1694.0360,5.9432,180,-1,-1,900); //swat vehicle
- AddStaticVehicleEx(528,1561.2257,-1694.0164,5.9347,180,-1,-1,900); //swat vehicle 02
- AddStaticVehicleEx(598,1591.4315,-1710.1624,5.6255,0,-1,-1,900); //police lvpd car
- AddStaticVehicleEx(596,1601.8004,-1704.2368,5.6111,90,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596,1601.8004,-1700.1127,5.6111,90,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596,1601.8004,-1696.0378,5.6111,90,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596,1601.8004,-1691.9602,5.6111,90,-1,-1,900); //police lspd car
- AddStaticVehicleEx(596, 1535.7517, -1668.5831, 13.1053, 360.0000, 0, 1, 900); // police lspd car
- AddStaticVehicleEx(599,1585.3041,-1671.7306,6.1209,269.1276,0,1,900); //police rancher car
- AddStaticVehicleEx(599,1585.5951,-1667.6407,6.0218,270.1369,0,1,900); //police rancher car
- AddStaticVehicleEx(598,1601.8846,-1683.9987,5.6107,89.8121,0,1,900); //police lvpd car
- AddStaticVehicleEx(598,1602.0452,-1687.9415,5.6112,90.9819,0,1,900); //police lvpd car
- AddStaticVehicleEx(523,1600.2445,-1711.6592,5.4535,44.0296,0,1,900); //police bike
- AddStaticVehicleEx(523,1602.6547,-1709.4182,5.4535,46.7312,0,1,900); //police bike
- AddStaticVehicleEx(598,1595.4485,-1710.2502,5.6096,359.5797,0,1,900); //police lvpd car
- //SPAWN CARS
- AddStaticVehicleEx(579,883.5909,-1658.0751,13.4765,180.1207,0,0,900); // Huntley
- AddStaticVehicleEx(421,870.3824,-1678.7533,13.4294,179.4584,1,1,900); // Washington
- //HOSPITAL
- AddStaticVehicleEx(563, 1162.5315, -1373.2607, 32.3312, 270.1107, 3, 1, 900); // Raindance 1
- AddStaticVehicleEx(563, 1163.3928, -1357.1760, 32.3656, 269.4890, 3, 1, 900); //Raindance 2
- //AIRPORT
- AddStaticVehicleEx(519,1889.6531,-2629.1267,14.4657,0,-1,-1,900); // Shamal 1
- AddStaticVehicleEx(519,1823.1190,-2629.1267,14.4657,0,-1,-1,900); // Shamal 2
- AddStaticVehicleEx(519,1754.5325,-2629.1267,14.4657,0,-1,-1,900); // Shamal 3
- AddStaticVehicleEx(487,1964.2646,-2629.1267,13.7619,0,-1,-1,900); // Heli 1
- AddStaticVehicleEx(487,1944.7985,-2629.1267,13.7354,0,-1,-1,900); // Heli 2
- AddStaticVehicleEx(417,1765.6274,-2285.0801,26.8743,0,-1,-1,900); // Levi 1
- AddStaticVehicleEx(593,1616.7531,-2627.9131,14.0094,0,-1,-1,900); // Dodo 1
- AddStaticVehicleEx(593,1681.9587,-2627.9131,14.0094,0,-1,-1,900); // Dodo 2
- //BOATS
- AddStaticVehicleEx(430,2473.2754,-2716.4000,0,90,-1,-1,900); // LSPD 1
- AddStaticVehicleEx(430,2446.4270,-2716.4000,0,90,-1,-1,900); // LSPD 2
- //BIKES
- AddStaticVehicleEx(481,1909.3695,-1416.4291,16.0000,90.0000,26,1,900); // Skatepark 1
- AddStaticVehicleEx(481,1927.2667,-1436.1995,16.0000,90.0000,26,1,900); // Skatepark 2
- //BOATS
- AddStaticVehicleEx(484,719.9970,-1696.9248,0.1500,180.0000,1,1,900); // Boat 1
- AddStaticVehicleEx(453,719.9970,-1626.4930,0.1500,180.0000,1,1,900); // Boat 2
- AddStaticVehicleEx(453,719.9970,-1638.4017,0.1500,180.0000,1,1,900); // Boat 3
- //STRANDEDCARS
- AddStaticVehicleEx(480,2493.5391,1239.4542,10.5939,0.1534,1,1,900); // Comet 1
- AddStaticVehicleEx(480,-1576.0280,-2728.5027,48.2507,144.9941,1,1,900); // Comet 2
- AddStaticVehicleEx(480,2441.3447,2017.1165,10.5276,270.8628,1,1,900); // Comet 3
- AddStaticVehicleEx(480,1117.5936,2069.2937,10.5276,181.1499,1,1,900); // Comet 4
- AddStaticVehicleEx(480,920.9744,2012.0786,10.8600,269.9051,1,1,900); // Comet 5
- //SPECIAL
- AddStaticVehicleEx(454,729.2374,-1496.4160,0.2745,179.2701,-1,-1,900); // boat1
- AddStaticVehicleEx(512,-1436.8271,-946.4916,201.3638,270.5414,-1,-1,900); // cropduster
- AddStaticVehicleEx(532,-346.0279,-1067.7395,60.5232,357.7303,-1,-1,900); // combineharvester
- AddStaticVehicleEx(442,930.0162,-1064.6062,24.1230,179.2080,0,0,900); // romero
- AddStaticVehicleEx(525, 2282.9084, -2351.3218, 13.4, 225.36, 1, 79, 900); // TowTruck Pos
- AddStaticVehicleEx(525, 2289.9924, -2344.1809, 13.4, 225.36, 1, 79, 900); // TowTruck Pos
- AddStaticVehicleEx(525, 2297.6077, -2336.4568, 13.4, 225.36, 1, 79, 900); // TowTruck Pos
- AddStaticVehicleEx(572,743.7960,-594.3464,16.9159,269.2212,3,3,900); // mower
- AddStaticVehicleEx(428,1385.0476,-1009.4760,27.3589,0.1330,-1,-1,900); // bankvan
- AddStaticVehicleEx(508,-89.3810,-1604.8574,2.9916,121.6778,-1,-1,900); // camper
- AddStaticVehicleEx(469,1291.3120,-789.5865,96.4699,359.3932,-1,-1,900); // heli
- AddStaticVehicleEx(495,452.7136,-1812.0624,5.8968,181.9573,-1,-1,900); // sandking1
- AddStaticVehicleEx(495,447.6973,-1812.1508,5.8961,181.4140,-1,-1,900); // sandking2
- AddStaticVehicleEx(553,2112.0979,-2422.7620,14.8796,177.6028,73,118,900); // nevada
- AddStaticVehicleEx(530,1083.8391,-1230.6941,15.5836,0.0,-1,-1,900); // forklift
- AddStaticVehicleEx(446,2106.2417,-94.8254,-0.3685,125.0311,-1,-1,900); // speedboat
- AddStaticVehicleEx(577,1585.6345,1188.1622,10.6200,180.0000,1,1,900); // lv plane
- AddStaticVehicleEx(470,1544.1649,16.5959,24.1309,99.8654,-1,-1,900); // partiot
- AddStaticVehicleEx(478,1535.5079,25.7885,24.1359,193.4562,-1,-1,900); // walton
- AddStaticVehicleEx(489,1547.9408,-20.5773,21.5223,270.9849,0,0,900); // rancher 1
- AddStaticVehicleEx(489,1520.1488,5.2112,24.1746,281.2211,0,0,900); // rancher 2
- //FBI
- AddStaticVehicleEx(490,1759.6000,-1680.1136,16.0000,270.0000,0,0,900); // Rancher 1
- AddStaticVehicleEx(490,1759.6000,-1675.2715,16.0000,270.0000,0,0,900); // Rancher 2
- AddStaticVehicleEx(482,1759.6000,-1667.3435,16.0000,270.0000,0,0,900); // Burrito 1
- AddStaticVehicleEx(482,1759.6000,-1661.9944,16.0000,270.0000,0,0,900); // Burrito 2
- AddStaticVehicleEx(415,1775.1281,-1703.4574,16.0000,358.0000,0,0,900); // Cheetah 1
- AddStaticVehicleEx(415,1783.0220,-1703.4574,16.0000,358.0000,0,0,900); // Cheetah 2
- // TRASHMAN
- AddStaticVehicleEx(408, 2183.7778, -1989.2, 16.0, 0.0, 1, 1, 900); // Trashmaster #1
- AddStaticVehicleEx(408, 2188.0386, -1989.2, 16.0, 0.0, 1, 1, 900); // Trashmaster #2
- AddStaticVehicleEx(408, 2192.1223, -1989.2, 16.0, 0.0, 1, 1, 900); // Trashmaster #3
- AddStaticVehicleEx(574,2156.8496,-1970.3,16.0,0.0,1,1,900); // Sweeper #1
- AddStaticVehicleEx(574,2159.9492,-1970.3,16.0,0.0,1,1,900); // Sweeper #2
- AddStaticVehicleEx(574,2163.0276,-1970.3,16.0,0.0,1,1,900); // Sweeper #3
- AddStaticVehicleEx(574,2165.9788,-1970.3,16.0,0.0,1,1,900); // Sweeper #4
- //TAXI VEHICLES
- AddStaticVehicleEx(438,1732.7784,-1858.6791,16.000,270,-1,-1,900); // Oldschool Cab 1
- AddStaticVehicleEx(438,1755.5264,-1858.6791,16.000,270,-1,-1,900); // Oldschool Cab 2
- AddStaticVehicleEx(438,1802.4722,-1864.7412,13.5806,358.2501,-1,-1,900); // Oldschool Cab 3
- AddStaticVehicleEx(438,1798.2456,-1864.6693,13.5776,359.2436,-1,-1,900); // Oldschool Cab 4
- AddStaticVehicleEx(420,1749.4923,-1851.2766,16.000,90,-1,-1,900); // Taxi 1
- AddStaticVehicleEx(420,1730.4237,-1851.2766,16.000,90,-1,-1,900); // Taxi 2
- AddStaticVehicleEx(420,1791.7245,-1864.8146,13.3530,0,-1,-1,900); // Taxi 3
- //GROVE
- AddStaticVehicleEx(550,2489.4717,-1682.6398,13.1574,270.4214,86,86,900); // Sunrise 1
- AddStaticVehicleEx(550,2487.4917,-1655.0593,13.1558,90.0239,86,86,900); // Sunrise 2
- AddStaticVehicleEx(492,2506.0317,-1676.8611,13.1585,325.6313,86,36,900); // Greenwood 3
- AddStaticVehicleEx(492,2508.3210,-1666.6718,13.1791,13.1814,86,36,900); // Greenwood 4
- AddStaticVehicleEx(509,2525.9890,-1663.8104,16.0,90.0,86,36,900); // Grove Street LowRiderbike #1
- AddStaticVehicleEx(509,2527.8147,-1663.8104,16.0,90.0,86,36,900); // Grove Street LowRiderbike #2
- //BALLAS
- AddStaticVehicleEx(566,2015.3771,-1130.9552,24.7592,89.4981,85,85,900); // Tahoma 1
- AddStaticVehicleEx(566,1993.3444,-1130.9552,25.3730,89.4981,85,85,900); // Tahoma 2
- AddStaticVehicleEx(566,2013.4194,-1094.5210,24.4616,339.1252,85,85,900); // Tahoma 3
- AddStaticVehicleEx(566,2008.5813,-1092.7949,24.4593,339.3990,85,85,900); // Tahoma 4
- //TRAIN
- AddStaticVehicleEx(538,1700.7551,-1953.6531,14.8756,200.0,-1,-1,900); // Train
- //CIVILIAN
- AddStaticVehicleEx(566, 2472.315673, -1756.201782, 13.328715, 90.356803, 1, 1, 1000);
- AddStaticVehicleEx(492, 2407.390136, -1720.056640, 13.437445, 359.391937, 0, 1, 1000);
- AddStaticVehicleEx(492, 2372.167236, -1719.807250, 13.340145, 181.111633, 0, 1, 1000);
- AddStaticVehicleEx(400, 2337.155273, -1674.494018, 13.227672, 0.323259, 1, 1, 1000);
- AddStaticVehicleEx(566, 2337.202636, -1682.487670, 13.219305, 0.216799, 0, 0, 1000);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SpawnPlayer(playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- TextDrawShowForPlayer(playerid, Textdraw3);
- TextDrawShowForPlayer(playerid, Textdraw4);
- TextDrawShowForPlayer(playerid, Textdraw5);
- AlreadyGiveWeapons[playerid] = false;
- server_ResetCash(playerid); //Resetting the players cash variable to zero.
- new string[128];
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- 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
- format(string, sizeof(string), ""COL_WHITE"Welcome back to "COL_YELLOW"TCoLS, "COL_WHITE"%s!", GetPlayerFirstName(playerid));
- SendClientMessage(playerid, -1, string);
- }
- else
- {
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Register","Welcome to TCoLS RPG.\n\nPlease register your account by typing the password below.","Register","Quit");
- format(string, sizeof(string), ""COL_WHITE"Welcome to "COL_YELLOW"TCoLS, "COL_WHITE"%s!", GetPlayerFirstName(playerid));
- SendClientMessage(playerid, -1, string);
- }
- if(!IsValidName(playerid) && !IsPlayerNPC(playerid) && PlayerInfo[playerid][pAdmin] < 2)
- {
- format(string, sizeof(string), "AdmCmd: %s has been kicked by NameChecker, reason: Invalid name format.", GetName(playerid));
- SendClientMessage(playerid, COLOR_LIGHTRED, "You've been kicked by NameChecker, reason: Invalid name format. (Firstname_Lastname)");
- Kick(playerid);
- }
- SetPlayerInterior(playerid,0);
- TogglePlayerSpectating(playerid, 1);
- gPlayerLogged[playerid] = 1;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new discstring[128];
- switch(reason)
- {
- case 0: format(discstring, sizeof(discstring), "* %s has left the server. (Timeout)", GetName(playerid));
- case 1: format(discstring, sizeof(discstring), "* %s has left the server. (Leaving)", GetName(playerid));
- case 2: format(discstring, sizeof(discstring), "* %s has left the server. (Kicked)", GetName(playerid));
- }
- ProxDetector(30.0, playerid, discstring, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- SaveAccountInfo(playerid);
- SaveWeaponsToFile(playerid);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawHideForPlayer(playerid, Text:Textdraw0);
- TextDrawHideForPlayer(playerid, Text:Textdraw1);
- TextDrawHideForPlayer(playerid, Text:Textdraw2);
- TextDrawHideForPlayer(playerid, Text:Textdraw3);
- TextDrawHideForPlayer(playerid, Text:Textdraw4);
- TextDrawHideForPlayer(playerid, Text:Textdraw5);
- SetTimerEx("blood",1000,true,"i",playerid);
- ResetPlayerWeapons(playerid);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
- if (!AlreadyGiveWeapons[playerid]) SetTimerEx("LoadWeaponsToFile",250,false,"i",playerid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if (realchat)
- {
- new string[128];
- format(string, sizeof(string), "%s says: %s", GetName(playerid), text);
- ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- format(string, sizeof(string), "says: %s", text);
- SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000);
- return 0;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new tmp2[256];
- if(IsPlayerConnected(playerid))
- {
- if(dialogid == 1)
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- 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");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Skin",0);
- INI_WriteInt(File,"Level",0);
- INI_WriteInt(File,"Int",0);
- INI_WriteInt(File,"VW",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"SecKey",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteFloat(File,"FacingAngle",0);
- INI_WriteFloat(File,"Health",0);
- INI_WriteFloat(File,"Armour",0);
- INI_WriteFloat(File,"LastX",0);
- INI_WriteFloat(File,"LastY",0);
- INI_WriteFloat(File,"LastZ",0);
- INI_Close(File);
- SetSpawnInfo(playerid, 0, 293, 2492.878417, -1750.079589, 13.495314, 90, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ResetPlayerWeapons(playerid);
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerScore(playerid, 1);
- server_GiveCash(playerid, 1000);
- SetCameraBehindPlayer(playerid);
- PlayerInfo[playerid][pSkin] = 299;
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pVW] = 0;
- PlayerInfo[playerid][pLevel] = 1;
- SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
- format(tmp2, sizeof(tmp2), "~y~Welcome ~n~~b~ %s", GetName(playerid));
- GameTextForPlayer(playerid, tmp2, 5000, 1);
- TogglePlayerSpectating(playerid, 0);
- }
- }
- if(dialogid == 2)
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ], PlayerInfo[playerid][pFacingAngle], 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- server_GiveCash(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
- SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
- SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
- SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
- format(tmp2, sizeof(tmp2), "~y~Welcome ~n~~b~ %s", GetName(playerid));
- GameTextForPlayer(playerid, tmp2, 5000, 1);
- TogglePlayerSpectating(playerid, 0);
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- format(tmp2, sizeof(tmp2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
- SendClientMessage(playerid, COLOR_WHITE,tmp2);
- 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
- }
- }
- else
- {
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Login","Welcome back to TCoLS .\n\nThat name is registered. Please enter your password below.","Login","Quit");
- }
- return 1;
- }
- }
- if(dialogid == 3)
- {
- if(gAdminAuthorized[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Your admin account has already been authorized.");
- return 1;
- }
- if(response)
- {
- if(!strlen(inputtext))
- {
- 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
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter your security code.");
- return 1;
- }
- if(strlen(inputtext) >= 50)
- {
- 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
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Security code is too long.");
- return 0;
- }
- if(fexist(UserPath(playerid)))
- {
- new tmp;
- new seckey = strval(inputtext);
- tmp = PlayerInfo[playerid][pSecKey];
- if(tmp == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "SERVER: You do not have a valid Security Key.");
- Kick(playerid);
- return 1;
- }
- if(seckey != tmp)
- {
- SendClientMessage(playerid, COLOR_RED, "SERVER: Security Key does not match. You have been kicked as a result.");
- Kick(playerid);
- return 1;
- }
- else
- {
- gAdminAuthorized[playerid] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Your admin account has successfully been authorized.");
- format(tmp2, sizeof(tmp2), "~y~Welcome ~n~~b~ %s", GetName(playerid));
- GameTextForPlayer(playerid, tmp2, 5000, 1);
- TogglePlayerSpectating(playerid, 0);
- return 1;
- }
- }
- }
- else
- {
- Kick(playerid);
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- //______________ADMIN COMMANDS____________________
- CMD:ah(playerid, params[]) return cmd_ahelp(playerid, params);
- CMD:ahelp(playerid, params[])
- {
- new alevel = PlayerInfo[playerid][pAdmin];
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");
- if(alevel >= 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "1 Moderator: (/ah)elp");
- }
- if(alevel >= 2)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "2 Junior Admin: /kick /ban /goto /sendtols /gotols /spawn");
- }
- if(alevel >= 3)
- {
- SendClientMessage(playerid, COLOR_GRAD3, "3 General Admin: /noooc /setskin /givegun /gotoint");
- }
- if(alevel >= 4)
- {
- SendClientMessage(playerid, COLOR_GRAD4, "4 Senior Admin: /veh /sethp /setarmor /givemoney");
- }
- if(alevel >= 1337)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "1337+ Admin: /rac ");
- }
- if(alevel >= 99999)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "99999+ Executive Admin: /makeadmin");
- }
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_GRAD5, "RCON Admin: /rcon cmdlist");
- }
- SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");
- }
- else SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- CMD:localizejob(playerid, params[])
- {
- if(sscanf(params, "s[32]", params))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /localizejob [job]");
- SendClientMessage(playerid, COLOR_GREY, "JOBS: sweeper | trucker | pizzaboy | courier | farmer | off");
- return 1;
- }
- if(!strcmp(params, "off", true))
- {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_WHITE, "You have cleared the marker on your map.");
- }
- else if(!strcmp(params, "sweeper", true))
- {
- SetPlayerCheckpoint(playerid, 1434.9597,-1845.5957,13.5469, 3);
- SendClientMessage(playerid, COLOR_WHITE, "The sweeper job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
- }
- else if(!strcmp(params,"trucker", true))
- {
- SetPlayerCheckpoint(playerid, 2070.7717,-1939.3361,13.5469, 3);
- SendClientMessage(playerid, COLOR_WHITE, "The trucker job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
- }
- else if(!strcmp(params,"pizzaboy", true))
- {
- SetPlayerCheckpoint(playerid, 2113.8711,-1786.4855,13.5608, 3);
- SendClientMessage(playerid, COLOR_WHITE, "The pizza boy job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
- }
- else if(!strcmp(params,"courier", true))
- {
- SetPlayerCheckpoint(playerid, 1615.8240,-1842.1359,13.5307, 3);
- SendClientMessage(playerid, COLOR_WHITE, "The courier job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
- }
- else if(!strcmp(params,"farmer", true))
- {
- SetPlayerCheckpoint(playerid, -481.2557,-1458.7404,15.3066, 3);
- SendClientMessage(playerid, COLOR_WHITE, "The farmer job is now marked on your map. Use /localizejobs off to turn the checkpoint off!");
- }
- return 1;
- }
- CMD:cmds(playerid, params[])
- {
- new long_string[600];
- 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");
- ShowPlayerDialog(playerid, 712, DIALOG_STYLE_MSGBOX, "Commands", long_string, "CANCEL", "");
- return 1;
- }
- CMD:help(playerid, params[])
- {
- new long_string[400];
- 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.");
- ShowPlayerDialog(playerid, 713, DIALOG_STYLE_MSGBOX, "Help", long_string, "CANCEL", "");
- return 1;
- }
- CMD:newbie(playerid, params[])
- {
- new sendername[MAX_PLAYER_NAME], string[160];
- if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command.");
- if(isnull(params)) return SCM(playerid, COLOR_GREY,"USAGE: /newbie [ask a question here]");
- GetPlayerName(playerid,sendername,sizeof(sendername));
- sendername[strfind(sendername,"_")] = ' ';
- format(string,160,"((NEWBIE: %s: %s ))", sendername, params);
- printf("%s", string);
- OOCOff(COLOR_BLUE,string);
- return 1;
- }
- CMD:veh(playerid, params[])
- {
- new car,color,color2;
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(sscanf(params, "iii", car,color,color2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [model] [color1] [color2]");
- if(car < 400 || car > 611) return SendClientMessage(playerid,COLOR_GRAD2, "Invalid vehicle ID specified !(411 - 611)");
- if(color> 255 || color< 0) return SendClientMessage(playerid, COLOR_GRAD2, "Car color ID's: 0-255");
- if(color2> 255 || color2< 0) return SendClientMessage(playerid, COLOR_GRAD2, "Car color ID's: 0-255");
- if(IsPlayerInAnyVehicle(playerid)) return RemovePlayerFromVehicle(playerid);
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X,Y,Z);
- GetPlayerFacingAngle(playerid,A);
- new carid = CreateVehicle(car, X,Y,Z,A, color, color2, -1);
- PutPlayerInVehicle(playerid,carid, 0);
- LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- CMD:makeadmin(playerid, params[])
- {
- new pID, value;
- if(PlayerInfo[playerid][pAdmin] < 99999 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, -1,"USAGE: /makeadmin [playerid/PartOfName] [level 1-99999]");
- else if (value < 0 || value > 99999) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid level specified !(1-99999)");
- else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2,"Invalid player specified !");
- else
- {
- new tName[MAX_PLAYER_NAME], string[128];
- new rand = random(9999);
- GetPlayerName(pID, tName, MAX_PLAYER_NAME);
- strreplace(tName, '_', ' ');
- gAdminAuthorized[pID] = 1;
- PlayerInfo[pID][pSecKey] = rand;
- format(string, sizeof(string), "* You've promoted %s to an level %d Administrator.", tName, value);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- 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]);
- SendClientMessage(pID, COLOR_LIGHTBLUE, string);
- printf("AdmCmd: %s has promoted %s to a level %d admin.", GetName(playerid), tName, value);
- PlayerInfo[pID][pAdmin] = value;
- }
- return 1;
- }
- CMD:noooc(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- if(PlayerInfo[playerid][pAdmin] >= 3 && (!noooc))
- {
- noooc = 1;
- SendClientMessageToAll(COLOR_GRAD2, "OOC chat channel disabled by an Admin !");
- }
- else if(PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
- {
- noooc = 0;
- SendClientMessageToAll(COLOR_GRAD2, "OOC chat channel enabled by an Admin !");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- CMD:kick(playerid,params[])
- {
- new id,name1[MAX_PLAYER_NAME], reason[35], string[128], logstring[256];
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2,NOTADMIN);
- else if(sscanf(params,"uz",id,reason)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /kick [playerid/PartOfName] [reason]");
- else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified !");
- else if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't ban higher level administrators !");
- else
- {
- new year, month, day;
- getdate(year, month, day);
- GetPlayerName(id,name1,sizeof(name1));
- format(string, sizeof(string),"AdmCmd: %s has been kicked by %s, reason: %s",name1, GetName(playerid), reason);
- SendClientMessageToAll(COLOR_LIGHTRED,string);
- Kick(id);
- format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", name1, GetName(playerid), reason, month, day, year);
- KickLog(logstring);
- }
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- new id, reason[35], name2[MAX_PLAYER_NAME], name1[MAX_PLAYER_NAME], string[128];
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2,NOTADMIN);
- if(sscanf(params,"uz", id, reason)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /ban [playerid/PartOfName] [Reason]");
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY,"Invalid player specified !");
- else
- {
- if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't ban higher level administrators !");
- new year, month, day;
- new logstring[256];
- getdate(year, month, day);
- GetPlayerName(id, name2, sizeof(name2));
- GetPlayerName(playerid, name1, sizeof(name1));
- format(string, sizeof(string), "AdmCmd: %s has been banned by %s, reason: %s", name2, GetName(playerid), reason);
- format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", name2, GetName(playerid), reason, month, day, year);
- BanLog(logstring);
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- new plrIP[16];
- GetPlayerIp(id,plrIP, sizeof(plrIP));
- SendClientMessage(id,COLOR_YELLOW,"|___________[BAN INFO]___________|");
- format(string, sizeof(string), "Your name: %s.",name2);
- SendClientMessage(id, COLOR_WHITE, string);
- format(string, sizeof(string), "Your IP: %s.",plrIP);
- SendClientMessage(id, COLOR_WHITE, string);
- format(string, sizeof(string), "Who banned you: %s.",name1);
- SendClientMessage(id, COLOR_WHITE, string);
- format(string, sizeof(string), "Reason: %s.",reason);
- SendClientMessage(id, COLOR_WHITE, string);
- SendClientMessage(id,COLOR_YELLOW,"|___________[BAN INFO]___________|");
- format(string,sizeof(string),"Please take a screenshot of this message (F8) and include it in your ban appeal.",GetName(playerid));
- SendClientMessage(playerid, COLOR_YELLOW,string);
- Ban(id);
- }
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- new ID;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "USAGE: /goto [playerid]");//checks if you have written something after /goto if no it sends error
- else if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");
- 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
- else//ELSE what will happen if no errors
- {
- new pinterior = GetPlayerInterior(ID);
- new Float:x, Float:y, Float:z;//creates new floats
- 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
- 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
- SetPlayerInterior(playerid, pinterior);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- CMD:gotols(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- else
- {
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1529.6, -1691.2, 13.3);
- SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported to Los Santos!");
- }
- return 1;
- }
- CMD:givegun(playerid, params[])
- {
- new id, gun, ammo;
- if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
- else if(sscanf(params,"uii", id, gun, ammo)) return SCM(playerid, COLOR_GREY,"USAGE: /givegun [playerid/partofname] [gunid] [ammo]");
- else if(gun > 47 || gun < 1) return SCM(playerid, COLOR_GREY,"GUN ID'S: 1-47");
- else if(ammo > 999 || ammo < 1) return SCM(playerid, COLOR_GREY,"Ammo 1-999");
- else
- {
- GivePlayerWeapon(id, gun, ammo);
- }
- return 1;
- }
- CMD:gotoint(playerid, params[])
- {
- new Interior, Float: X, Float: Y, Float: Z;
- if( sscanf( params, "dfff", Interior, X, Y, Z ) )
- {
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- SendClientMessage( playerid, COLOR_WHITE, "USAGE: /gotoint [Interior ID] [x point] [y point] [z point]" );
- }
- }
- else
- {
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- SetPlayerPos( playerid, X, Y, Z );
- SetPlayerInterior( playerid, Interior );
- SendClientMessage( playerid, COLOR_GRAD2, "You have been teleported to the defined position !" );
- }
- }
- return 1;
- }
- CMD:rac(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- SendClientMessageToAll(COLOR_GRAD2, "SERVER: An admin has initiated an all vehicle respawn !");
- for(new i = 1; i <= MAX_VEHICLES; i++)
- {
- SetVehicleToRespawn(i);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- CMD:givemoney(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- new string[128], giveplayerid, money;
- if(sscanf(params, "ud", giveplayerid, money)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemoney [playerid] [money]");
- if(IsPlayerConnected(giveplayerid))
- {
- server_GiveCash(giveplayerid, money);
- format(string, sizeof(string), "* You have set %s's cash to an amount of $%d.",GetName(giveplayerid),money);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- new ip[32], ipex[32];
- new i_dateTime[2][3];
- gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
- getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(giveplayerid, ipex, sizeof(ipex));
- 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);
- PayLog(string);
- PlayerInfo[playerid][pCash] = money;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
- }
- return 1;
- }
- CMD:setarmor(playerid, params[])
- {
- new string[128], playa, health;
- if(sscanf(params, "ud", playa, health))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setarmor [playerid] [armor]");
- return 1;
- }
- if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't set higher level administrator's armor !");
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- SetPlayerArmour(playa, health);
- format(string, sizeof(string), "* You have set %s's armor to %d.", GetName(playa), health);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
- }
- return 1;
- }
- CMD:sethp(playerid, params[])
- {
- new string[128], playa, health;
- if(sscanf(params, "ud", playa, health))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sethp [playerid] [health]");
- return 1;
- }
- if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, " You can't set higher level administrator's HP !");
- if (PlayerInfo[playerid][pAdmin] >= 4) {
- if(IsPlayerConnected(playa)) {
- if(playa != INVALID_PLAYER_ID)
- {
- SetPlayerHealth(playa, health);
- format(string, sizeof(string), "* You have set %s's health to %d.", GetName(playa), health);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- }
- else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
- }
- else {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
- }
- return 1;
- }
- CMD:setskin(playerid, params[])
- {
- new name[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], id, skinid, string[128];
- if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- else if(sscanf(params, "ui", id, skinid)) return SendClientMessage(playerid, -1, "USAGE: /setskin [playerid] [skinid]");
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- GetPlayerName(id, targetname, MAX_PLAYER_NAME);
- if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player specified !");
- 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; }
- else
- {
- SetPlayerSkin(id, skinid);
- format(string, 128, "* Admin %s has set your skinid to skinid %d.", name, skinid);
- SendClientMessage(id, COLOR_LIGHTBLUE, string);
- format(string, 128, "* You have set player %s their skinid to %d.", targetname, skinid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- PlayerInfo[id][pSkin] = skinid;
- return 1;
- }
- CMD:spawn(playerid, params[])
- {
- new ID;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "USAGE: /spawn [playerid]");//checks if you have written something after /goto if no it sends error
- else if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");
- else//ELSE what will happen if no errors
- {
- SetPlayerPos(ID, 2492.878417, -1750.079589, 13.495314);
- SetPlayerFacingAngle(ID, 90);
- SetPlayerInterior(ID, 0);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- CMD:gethere(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new targetid, Float:x, Float:y, Float:z;//defines floats and [U]targetid(same which we did as id above)[/U]
- new vw = GetPlayerVirtualWorld(playerid);
- 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
- else if(playerid == targetid) return SendClientMessage(playerid, COLOR_GRAD2, "You are already at yourself !");
- 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
- new interior = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, x, y, z);//gets player pos PLAYER POS not targetid
- SetPlayerPos(targetid, x+1, y+1, z);
- GetPlayerVirtualWorld(playerid);
- SetPlayerVirtualWorld(targetid, vw);
- SetPlayerInterior(targetid, interior);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- return 1;
- }
- //____________________________________________________________
- //___________________PLAYER COMMANDS_____________________
- CMD:sendtols(playerid, params[])
- {
- new id;
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
- if(sscanf(params,"u", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sendtols [playerid/PartOfName]");
- if(id != INVALID_PLAYER_ID)
- {
- PlayerInfo[id][pInt] = 0;
- SetPlayerInterior(id, 0);
- SetPlayerVirtualWorld(id, 0);
- SetPlayerPos(id, 1529.6, -1691.2, 13.3);
- SendClientMessage(id, COLOR_GRAD1, " You have been teleported !");
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid player specified !");
- return 1;
- }
- CMD:stats(playerid, params[])
- {
- new long_string[400];
- strcat(long_string, "/stats command is bugged, our scripters are going to fix it soon.");
- ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Stats", long_string, "CANCEL", "");
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- CMD:id(playerid, params[])
- {
- new string[128], giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /id [playerid]");
- if(IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "(ID: %d) - (Name: %s) - (Level: %d) - (Ping: %d)", giveplayerid, GetName(giveplayerid), PlayerInfo[giveplayerid][pLevel], GetPlayerPing(giveplayerid));
- SendClientMessage(playerid, COLOR_WHITE, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified !");
- }
- return 1;
- }
- CMD:time(playerid, params[])
- {
- new string[128];
- new mtext[20];
- new year, month,day;
- getdate(year, month, day);
- if(month == 1) { mtext = "January"; }
- else if(month == 2) { mtext = "February"; }
- else if(month == 3) { mtext = "March"; }
- else if(month == 4) { mtext = "April"; }
- else if(month == 5) { mtext = "May"; }
- else if(month == 6) { mtext = "June"; }
- else if(month == 7) { mtext = "July"; }
- else if(month == 8) { mtext = "August"; }
- else if(month == 9) { mtext = "September"; }
- else if(month == 10) { mtext = "October"; }
- else if(month == 11) { mtext = "November"; }
- else if(month == 12) { mtext = "December"; }
- new hour,minuite,second;
- gettime(hour,minuite,second);
- FixHour(hour);
- hour = shifthour;
- if(minuite < 10)
- {
- format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
- }
- else
- {
- format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
- }
- if(!IsPlayerInAnyVehicle(playerid))
- {
- GameTextForPlayer(playerid, string, 5000, 1);
- ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_watch",4.0,0,0,0,0,0);
- }
- else
- {
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- return 1;
- }
- CMD:pay(playerid, params[])
- {
- new
- iTargetID, iCashAmount;
- if(sscanf(params, "ui", iTargetID, iCashAmount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pay [playerid] [amount]");
- if(iTargetID == playerid)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You can not use this command on yourself !");
- return 1;
- }
- if(iCashAmount > 1000 && PlayerInfo[playerid][pLevel] < 2)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You must be level 2 to pay over $1,000 !");
- return 1;
- }
- if(iCashAmount < 1 || iCashAmount > 10000)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Don't go below $1, or above $10,000 at once !");
- return 1;
- }
- if (IsPlayerConnected(iTargetID))
- {
- if (ProxDetectorS(5.0, playerid, iTargetID))
- {
- new
- string[128], giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], playermoney = server_GetCash(playerid);
- giveplayer = GetName(iTargetID);
- sendername = GetName(playerid);
- if(server_GetCash(playerid) < playermoney) return SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
- else
- {
- server_GiveCash(playerid, -iCashAmount);
- server_GiveCash(iTargetID, iCashAmount);
- format(string, sizeof(string), " You have paid $%d to %s.", iCashAmount, GetName(iTargetID));
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved $%d from %s.", iCashAmount, GetName(playerid));
- SendClientMessage(iTargetID, COLOR_GRAD1, string);
- new ip[32], ipex[32];
- new i_dateTime[2][3];
- gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
- getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(iTargetID, ipex, sizeof(ipex));
- 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);
- PayLog(string);
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- format(string, sizeof(string), "[Admin] %s (IP:%s) has paid $%d to %s (IP:%s)", GetName(playerid), ip, iCashAmount, GetName(iTargetID), ipex);
- format(string, sizeof(string), "AdmWarning: %s (IP:%s) has paid $%d to %s (IP:%s)", GetName(playerid), ip, iCashAmount, GetName(iTargetID), ipex);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- PayWarn[playerid][iTargetID] += iCashAmount;
- if(PayWarn[playerid][iTargetID] >= 100000 && PlayerInfo[playerid][pLevel] <= 3)
- {
- 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]);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- if(iCashAmount >= 1000000)
- {
- ABroadCast(COLOR_YELLOW,string,2);
- }
- PlayerPlaySound(iTargetID, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "* %s takes out some cash, and hands it to %s.", GetName(playerid) ,GetName(iTargetID));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player isn't near you.");
- }
- }
- else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
- return 1;
- }
- CMD:togwhisper(playerid, params[])
- {
- if (!HidePM[playerid])
- {
- HidePM[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "You have disabled whisper chat !");
- }
- else
- {
- HidePM[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "You have enabled whisper chat !");
- }
- return 1;
- }
- CMD:low(playerid, params[]) {
- return cmd_l(playerid, params);
- }
- CMD:l(playerid, params[])
- {
- if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/l)ow [quiet chat]");
- new string[128];
- format(string, sizeof(string), "%s says quietly: %s", GetName(playerid), params);
- ProxDetector(5.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- format(string, sizeof(string), "(quietly) %s", params);
- SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000);
- return 1;
- }
- CMD:w(playerid, params[]) {
- return cmd_whisper(playerid, params);
- }
- CMD:whisper(playerid, params[])
- {
- new giveplayerid, whisper[128];
- if(sscanf(params, "us[128]", giveplayerid, whisper))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/w)hisper [playerid] [message]");
- return 1;
- }
- if (IsPlayerConnected(giveplayerid))
- {
- if(HidePM[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is blocking whispers!");
- return 1;
- }
- new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[128];
- sendername = GetName(playerid);
- giveplayer = GetName(giveplayerid);
- if(ProxDetectorS(5.0, playerid, giveplayerid) || PlayerInfo[playerid][pAdmin] >= 2)
- {
- format(string, sizeof(string), "%s(ID: %d) whispers: %s", GetName(playerid), playerid, whisper);
- SendClientMessage(giveplayerid,COLOR_YELLOW, string);
- format(string, sizeof(string), "Whisper to %s(ID: %d): %s", GetName(giveplayerid), giveplayerid, whisper);
- SendClientMessage(playerid,COLOR_YELLOW, string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player isn't near you !");
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified !");
- }
- return 1;
- }
- CMD:me(playerid, params[])
- {
- new string[128];
- if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: /me [action]");
- format(string, sizeof(string), "* %s %s", GetName(playerid), params);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- return 1;
- }
- CMD:do(playerid, params[])
- {
- new string[128];
- if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: /do [local chat]");
- format(string, sizeof(string), "* %s (( %s ))", params, GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- return 1;
- }
- CMD:s(playerid,params[])
- {
- new string[128];
- if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: (/s)hout [local chat]");
- format(string, sizeof(string), "%s shouts: %s!", GetName(playerid), params);
- ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
- return 1;
- }
- CMD:shout(playerid, params[]) return cmd_s(playerid, params);
- CMD:b(playerid,params[])
- {
- new string[128];
- if(isnull(params)) return SendClientMessage(playerid, -1,"USAGE: /b [local ooc]");
- format(string, sizeof(string), "%s: (( %s ))", GetName(playerid), params);
- ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 1;
- }
- CMD:ooc(playerid, params[])
- {
- new string[160];
- if(isnull(params)) return SendClientMessage(playerid, -1,"USAGE: /ooc [chat]");
- if ((noooc) && PlayerInfo[playerid][pAdmin] < 1 && gOOC[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "The OOC channel has been disabled by an Admin !");
- return 1;
- }
- else
- {
- format(string,160,"(( %s: %s ))", GetName(playerid), params);
- printf("(( %s: %s ))", GetName(playerid), string);
- OOCOff(COLOR_OOC,string);
- }
- if(gOOC[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You have the channel toggled, /togooc to re-enable!");
- return 1;
- }
- return 1;
- }
- CMD:o(playerid, params[]) return cmd_ooc(playerid, params);
- //___________________________________________________
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: Invalid command, please use the available commands in /cmds.");
- else if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "You're not logged in."); }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement