[RP] 911 CFH System [SLEDMORE]

Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    [RP] 911 CFH System [SLEDMORE]

    Hey,

    Well, I was due to release this, But Harsh said not to, then he goes to release his? Wdf?

    Credits:
    Me: 50%
    Swimo: 50%

    Anyways, here is the release;

    911 command:
    Code:
    #region :911 <message>
                        case "911":
                            {
                                if (copCdLooper != null)
                                {
                                    sendData("BK" + "Sorry, but you have to wait to send another 911 call.");
                                }
                                else
                                {
                                    int isArrested;
                                    int isDead;
                                    int copID;
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
                                        isDead = dbClient.getInt("SELECT dead FROM users WHERE name = '" + _Username + "'");
                                        copID = dbClient.getInt("SELECT id FROM police_call");
                                    }
                                    if (isArrested == 0 && isDead == 0)
                                    {
                                        string Message = Text.Substring(3);
                                        Room.sendSaying(roomUser, "*calls the police for help*");
                                        using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                        {
                                            dbClient.runQuery("UPDATE policecall SET message = '[911]" + Message + "' WHERE id = '1'"); ;
                                            dbClient.runQuery("UPDATE policecall SET room = '" + roomUser.roomID + "' WHERE id = '1'"); ;
                                            dbClient.runQuery("UPDATE policecall SET user = '" + _Username + "' WHERE id = '1'"); ;
                                        }
                                        userManager.sendToCop(1, false, "" + "");
    
                                        ThreadStart copCdStarter = new ThreadStart(copCoolDown);
                                        copCdLooper = new Thread(copCdStarter);
                                        copCdLooper.Priority = ThreadPriority.Lowest;
                                        copCdLooper.Start();
                                    }
                                    else
                                    {
                                        sendData("You cannot be arrested or dead to ring 911!");
                                    }
                                }
                                break;
                            }
                        #endregion
    Usermanager.cs send data!
    Code:
     public static void sendToCop(int getCorp, bool includeHigher, string Data)
            {
                try
                {
                    {
                        foreach (virtualUser User in _Users.Values)
                        {
                            int getWorking;
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                getCorp = dbClient.getInt("SELECT corp_id FROM users WHERE name = '" + User._Username + "'");
                                getWorking = dbClient.getInt("SELECT working FROM users WHERE name = '" + User._Username + "'");
                            }
                            if (getCorp == 1 && getWorking == 1)
                            {
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    string msg;
                                    int room;
                                    string user;
                                    msg = dbClient.getString("SELECT Message FROM policecall WHERE id = '1'");
                                    room = dbClient.getInt("SELECT room FROM policecall WHERE id = '1'");
                                    user = dbClient.getString("SELECT user FROM policecall WHERE id = '1'");
    
                                    User.sendData(Data);
    
                                    int cfhID;
                                    cfhID = dbClient.getInt("SELECT id FROM policecalldb WHERE username = '" + user + "' AND used = '0'");
                                    string roomName;
                                    roomName = dbClient.getString("SELECT name FROM rooms WHERE id = '" + room + "'");
    
                                    dbClient.runQuery("UPDATE policecalldb SET used = '1' WHERE username = '" + user + "' AND used = '0' LIMIT 1");
                                    dbClient.runQuery("INSERT INTO policecalldb (username,message,date,used,subject,roomid) VALUES ('" + user + "','" + msg + "','" + DateTime.Now + "','0','911','" + room + "')");
    
                                    User.sendData("BT" + Encoding.encodeVL64(cfhID) + Convert.ToChar(2) + "I" + "Sent: " + DateTime.Now + Convert.ToChar(2) + user + Convert.ToChar(2) + msg + Convert.ToChar(2) + Encoding.encodeVL64(room) + Convert.ToChar(2) + roomName + Convert.ToChar(2) + "I" + Convert.ToChar(2) + Encoding.encodeVL64(room));
                                }
                            }
                        }
                    }
                }
                catch { }
            }
    Database tables:
    Policecall:
    Code:
    CREATE TABLE IF NOT EXISTS `policecall` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `message` varchar(200) NOT NULL,
      `user` varchar(15) NOT NULL,
      `room` int(11) NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
    
    --
    -- Dumping data for table `policecall`
    --
    
    INSERT INTO `policecall` (`id`, `message`, `user`, `room`) VALUES
    (1, '[911] Keep this here as default!', 'Craig-Martin', 7);
    Policecalldb:
    Code:
    CREATE TABLE IF NOT EXISTS `policecalldb` (
      `id` int(10) NOT NULL AUTO_INCREMENT,
      `username` varchar(25) NOT NULL,
      `message` mediumtext CHARACTER SET utf8 NOT NULL,
      `date` varchar(50) CHARACTER SET utf8 NOT NULL,
      `used` enum('0','1') CHARACTER SET utf8 NOT NULL,
      `subject` varchar(50) CHARACTER SET utf8 NOT NULL,
      `roomid` int(20) NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
    IF YOU LIKE THIS SHOW YOUR APPRECIATION AND CLICK THE THANKS BUTTON!
    Last edited by Sledmore; 23-10-10 at 03:57 AM.


  2. #2

    herp a derp

    vLife is offline

    Super ModRank
    Apr 2009 Join Date
    The BahamasLocation
    3,811Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Nice release SM,

    Sure some RP Hote Owners was looking for this.

  3. #3
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    lolz it does look like mine xD

  4. #4
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Shacobesaurus View Post
    lolz it does look like mine xD
    Nuh uh, I coded this way back long ago with Swimo, Then made it into thingy, I Already discussed this on MSN with you, I changed this, I don't know how you got it like that..


    Quote Originally Posted by vLife View Post
    Nice release SM,

    Sure some RP Hote Owners was looking for this.
    Cheers buddy (;
    Last edited by Sledmore; 23-10-10 at 04:00 AM.

  5. #5
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by sledmore View Post
    hey,

    well, i was due to release this, but harsh said not to, then he goes to release his? Wdf?

    credits:
    me: 50%
    swimo: 50%

    anyways, here is the release;

    911 command:
    Code:
    #region :911 <message>
                        case "911":
                            {
                                if (copcdlooper != null)
                                {
                                    senddata("bk" + "sorry, but you have to wait to send another 911 call.");
                                }
                                else
                                {
                                    int isarrested;
                                    int isdead;
                                    int copid;
                                    using (databaseclient dbclient = eucalypt.dbmanager.getclient())
                                    {
                                        isarrested = dbclient.getint("select arrested from users where name = '" + _username + "'");
                                        isdead = dbclient.getint("select dead from users where name = '" + _username + "'");
                                        copid = dbclient.getint("select id from police_call");
                                    }
                                    if (isarrested == 0 && isdead == 0)
                                    {
                                        string message = text.substring(3);
                                        room.sendsaying(roomuser, "*calls the police for help*");
                                        using (databaseclient dbclient = eucalypt.dbmanager.getclient())
                                        {
                                            dbclient.runquery("update policecall set message = '[911]" + message + "' where id = '1'"); ;
                                            dbclient.runquery("update policecall set room = '" + roomuser.roomid + "' where id = '1'"); ;
                                            dbclient.runquery("update policecall set user = '" + _username + "' where id = '1'"); ;
                                        }
                                        usermanager.sendtocop(1, false, "" + "");
    
                                        threadstart copcdstarter = new threadstart(copcooldown);
                                        copcdlooper = new thread(copcdstarter);
                                        copcdlooper.priority = threadpriority.lowest;
                                        copcdlooper.start();
                                    }
                                    else
                                    {
                                        senddata("you cannot be arrested or dead to ring 911!");
                                    }
                                }
                                break;
                            }
                        #endregion
    usermanager.cs send data!
    Code:
     public static void sendtocop(int getcorp, bool includehigher, string data)
            {
                try
                {
                    {
                        foreach (virtualuser user in _users.values)
                        {
                            int getworking;
                            using (databaseclient dbclient = eucalypt.dbmanager.getclient())
                            {
                                getcorp = dbclient.getint("select corp_id from users where name = '" + user._username + "'");
                                getworking = dbclient.getint("select working from users where name = '" + user._username + "'");
                            }
                            if (getcorp == 1 && getworking == 1)
                            {
                                using (databaseclient dbclient = eucalypt.dbmanager.getclient())
                                {
                                    string msg;
                                    int room;
                                    string user;
                                    msg = dbclient.getstring("select message from policecall where id = '1'");
                                    room = dbclient.getint("select room from policecall where id = '1'");
                                    user = dbclient.getstring("select user from policecall where id = '1'");
    
                                    user.senddata(data);
    
                                    int cfhid;
                                    cfhid = dbclient.getint("select id from policecalldb where username = '" + user + "' and used = '0'");
                                    string roomname;
                                    roomname = dbclient.getstring("select name from rooms where id = '" + room + "'");
    
                                    dbclient.runquery("update policecalldb set used = '1' where username = '" + user + "' and used = '0' limit 1");
                                    dbclient.runquery("insert into policecalldb (username,message,date,used,subject,roomid) values ('" + user + "','" + msg + "','" + datetime.now + "','0','911','" + room + "')");
    
                                    user.senddata("bt" + encoding.encodevl64(cfhid) + convert.tochar(2) + "i" + "sent: " + datetime.now + convert.tochar(2) + user + convert.tochar(2) + msg + convert.tochar(2) + encoding.encodevl64(room) + convert.tochar(2) + roomname + convert.tochar(2) + "i" + convert.tochar(2) + encoding.encodevl64(room));
                                }
                            }
                        }
                    }
                }
                catch { }
            }
    database tables:
    policecall:
    Code:
    create table if not exists `policecall` (
      `id` int(11) not null auto_increment,
      `message` varchar(200) not null,
      `user` varchar(15) not null,
      `room` int(11) not null,
      primary key (`id`)
    ) engine=myisam  default charset=latin1 auto_increment=2 ;
    
    --
    -- dumping data for table `policecall`
    --
    
    insert into `policecall` (`id`, `message`, `user`, `room`) values
    (1, '[911] keep this here as default!', 'craig-martin', 7);
    policecalldb:
    Code:
    create table if not exists `policecalldb` (
      `id` int(10) not null auto_increment,
      `username` varchar(25) not null,
      `message` mediumtext character set utf8 not null,
      `date` varchar(50) character set utf8 not null,
      `used` enum('0','1') character set utf8 not null,
      `subject` varchar(50) character set utf8 not null,
      `roomid` int(20) not null,
      primary key (`id`)
    ) engine=myisam default charset=latin1 auto_increment=1 ;
    if you like this show your appreciation and click the thanks button!
    thank you every much

  6. #6
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by cooldude159 View Post
    thank you every much
    Aha, Ya welcome (;

  7. #7
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Sledmore View Post
    Aha, Ya welcome (;
    Is it Just like HabboRP cfh system kinda???

    i knew Harsh would of done that to btw :P

  8. #8
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by cooldude159 View Post
    Is it Just like HabboRP cfh system kinda???

    i knew Harsh would of done that to btw :P
    Yeah it is xD, Its the exact same, for the NYPD. And I'm abit pissed at it..

  9. #9
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Sledmore View Post
    Yeah it is xD, Its the exact same, for the NYPD. And I'm abit pissed at it..
    Then Why do you work with him jeez I have to admit he good but not that good But witch hotel would you say better Mine or Habbolt byw you should know who i am???

  10. #10
    Member diegoharsh is offline
    MemberRank
    Mar 2010 Join Date
    63Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Sledmore View Post
    Yeah it is xD, Its the exact same, for the NYPD. And I'm abit pissed at it..
    Soz Craig, Ma bad im looking forward to work with yu and cobe
    wid habbolt sooo excited :)

    ONT: 10/10
    Last edited by diegoharsh; 23-10-10 at 05:05 AM.

  11. #11
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by cooldude159 View Post
    Then Why do you work with him jeez I have to admit he good but not that good But witch hotel would you say better Mine or Habbolt byw you should know who i am???
    You are such a leet coder
    blah blah blah
    Good JOb i hope to see more.
    But i've given all of my 1 thanks to Harsh..
    Cause he needed a Boost :)
    Last edited by Makarov; 23-10-10 at 05:26 AM.

  12. #12
    Member diegoharsh is offline
    MemberRank
    Mar 2010 Join Date
    63Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Shacobesaurus View Post
    Why are you asking him? lol
    Is he like Mr.RP Know it All(Yes he is)
    but do you code?
    Just Asking
    Craig your ugly
    Just Saying
    Nice Release
    Just Playing
    Just Kidding
    Thanks for this
    I'm Tired
    Just Writing
    Good Night

    Lolll Funnnnnnnnnnnnnnnnny :D

  13. #13
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Shacobesaurus View Post
    Why are you asking him? lol
    Is he like Mr.RP Know it All(Yes he is)
    but do you code?
    Just Asking
    Craig your ugly
    Just Saying
    Nice Release
    Just Playing
    Just Kidding
    Thanks for this
    I'm Tired
    Just Writing
    Good Night
    What the fuck are you ON LOL.

  14. #14
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    -deletes-
    Now no-one can see it :D

  15. #15
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Shacobesaurus View Post
    You are such a leet coder
    blah blah blah
    Good JOb i hope to see more.
    But i've given all of my 1 thanks to Harsh..
    Cause he needed a Boost :)
    Well i'm a little coder i can make commands better more stable that about it But Harsh only as needs 2 commands to Buy a gun and knife But on my side i only need 1 command for each item he needs well figures i can code a little shit but yeah! Once again Sledmore Thank you!!

  16. #16
    Proficient Member swimoTheBig is offline
    MemberRank
    Aug 2008 Join Date
    Essex, UKLocation
    194Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Nice release craig, saves me recoding it :)

  17. #17
    Proficient Member CJRP is offline
    MemberRank
    Jan 2010 Join Date
    160Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Craig, You seriously are EPIC!

  18. #18
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by swimoTheBig View Post
    Nice release craig, saves me recoding it :)
    Aha, Thanks Sexy Swim!

    Quote Originally Posted by CJRP View Post
    Craig, You seriously are EPIC!
    Thanks Ceejay (;

  19. #19
    i didnt do this. Donkjam is offline
    MemberRank
    Jul 2007 Join Date
    4,494Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    The commands look the same as what other people have coded because well they are basically all done the same etc

    All these rp addons would be nice in 1 thread instead of clogging up the main section :)
    Posted via Mobile Device

  20. #20
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by Donkjam View Post
    The commands look the same as what other people have coded because well they are basically all done the same etc

    All these rp addons would be nice in 1 thread instead of clogging up the main section :)
    Posted via Mobile Device
    Nah the 911, Was done by me and Swimo ages ago, And cobe showed me a copy of his, and it was the EXACT same.. So I was thinking what the fuck, So i just went a head and released this..

  21. #21
    Proficient Member CJRP is offline
    MemberRank
    Jan 2010 Join Date
    160Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Like i said craig, Your work is epic, You've contributed loads to the habbo releases section........ I wonder what you will release next :O

  22. #22
    Proficient Member mango2735 is offline
    MemberRank
    Jun 2010 Join Date
    176Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Err... Nice i guess in My Point of view.

  23. #23
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Nice One Sledy <3

  24. #24
    Apprentice Wallis is offline
    MemberRank
    Oct 2010 Join Date
    21Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Looks very nice :D Thanks >:)

  25. #25
    Account Upgraded | Title Enabled! Sledmore is offline
    MemberRank
    Jun 2009 Join Date
    1,133Posts

    Re: [RP] 911 CFH System [SLEDMORE]

    Quote Originally Posted by CJRP View Post
    Like i said craig, Your work is epic, You've contributed loads to the habbo releases section........ I wonder what you will release next :O
    Quote Originally Posted by mango2735 View Post
    Err... Nice i guess in My Point of view.
    Quote Originally Posted by ŽÄK View Post
    Nice One Sledy <3
    Quote Originally Posted by Wallis View Post
    Looks very nice :D Thanks >:)
    Thanks guys, Glad ya all like it ;D.



Page 1 of 2 12 LastLast

Advertisement