Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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