• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

NYPD Helping

Status
Not open for further replies.
Joined
Jul 6, 2010
Messages
352
Reaction score
126
PHP:
                     #region :reccomend <user> 
                    case "reccomend": // reccomend a user for nypd 
                        { 
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) 
                            { 
                            if (User._Username == args[1]);
                            {
                                sendData("BK" + "Sorry, you cant recommend yourself.");
                            }
                            else
                            {
                            
                                virtualUser User = userManager.getUser(args[1]); 
                                dbClient.runQuery("UPDATE users SET becomenypd = '1', reccomendnypd = reccomendnypd + '1' WHERE name = '" + User._Username + "'"); 
                                User.sendData("BK" + "You have been reccomended by '" + _Username + "' to be NYPD"); 
                                sendData("BK" + "You have reccomended '" + User._Username + "' to be NYPD"); 
                            } 
                            }
                            break; 
                        }  
                       #endregion

shud say Sorry, you cant recommend yourself. if u try.

and added

Xavi.
 
Joined
Jun 25, 2009
Messages
831
Reaction score
475
PHP:
                     #region :reccomend <user> 
                    case "reccomend": // reccomend a user for nypd 
                        { 
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) 
                            { 
                            if (User._Username == args[1]);
                            {
                                sendData("BK" + "Sorry, you cant recommend yourself.");
                            }
                            else
                            {
                            
                                virtualUser User = userManager.getUser(args[1]); 
                                dbClient.runQuery("UPDATE users SET becomenypd = '1', reccomendnypd = reccomendnypd + '1' WHERE name = '" + User._Username + "'"); 
                                User.sendData("BK" + "You have been reccomended by '" + _Username + "' to be NYPD"); 
                                sendData("BK" + "You have reccomended '" + User._Username + "' to be NYPD"); 
                            } 
                            }
                            break; 
                        }  
                       #endregion

shud say Sorry, you cant recommend yourself. if u try.

and added

Xavi.

Bet me too it, but anyways mine is:

PHP:
#region :reccomend <user> 
                    case "reccomend": // reccomend a user for nypd 
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            {
                                if (_Username == User._Username)
                                {
                                    this.sendData("BK" + "You can't reccomend your self SAD BASTARD!");
                                }
                                else
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("UPDATE users SET becomenypd = '1', reccomendnypd = reccomendnypd + '1' WHERE name = '" + User._Username + "'");
                                        User.sendData("BK" + "You have been reccomended by '" + _Username + "' to be NYPD");
                                        sendData("BK" + "You have reccomended '" + User._Username + "' to be NYPD");
                                    }
                                    break;
                                }
                            }
                        }
                       #endregion

I've not tested it i never test :').
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
Right guys All done :) Fixed and that.


I used Both - They both work ( Atleast i think they do ) Lol. theres no errors so i dont see why they shouldnt. :)
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
notatm wil rel soz bout spellin on psp
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
Hey guys, thanks for the positive feedback. I thought i'd get Feed back like Rubbish - useless etc.. but thanks for the good feedback

This is my first release and i hope to keep releasing awsome stuff :)
 
Status
Not open for further replies.
Back
Top