[SERVICE] Custom Commands Database - Request/Post Here

Status
Not open for further replies.
Only donateur can enter room (get it out db)

Like:
PHP:
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                _Donateur = dbClient.getInt("SELECT * FROM users_don WHERE userid = '" + userID + "'");
                            }
                            if (_Donateur > 0) // User is donateur
                            {
V26 dissis x]

Quite a nice command, although that means all the other users are stuffed? apart from higher then the donator? lol
 
Code:
                    #region :massbadge
                    case "massbadge":
                        {
                            if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
                            {
                                return false;
                            }
                            {
                                foreach (virtualUser User in userManager._Users.Values)
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    dbClinet.runQuery("INSERT INTO users_badges(userid,badgeid) VALUES (" + User.userID + "," + args[1] + ")");
                                    User.refreshBadges();
                                }
                            }
                            break;
                        }
                    #endregion
Enjoy Swimo Leave me some fun :P

you wrote dbclinet.runquery xD

fixed code:
Code:
                    #region :massbadge
                    case "massbadge":
                        {
                            if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
                            {
                                return false;
                            }
                            {
                                foreach (virtualUser User in userManager._Users.Values)
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("INSERT INTO users_badges(userid,badgeid) VALUES (" + User.userID + "," + args[1] + ")");
                                        User.refreshBadges();
                                    }
                            }
                            break;
                        }
                    #endregion

=)
 
Here's a command that I wrote yesterday for someone that allows an administrator on the RP source that I released to hire anyone to a specific job.
PHP:
                    #region :superhire <user> <corpid> <rank>
                    case "superhire":
                        {
                            if (_Rank > 6)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                int corpID = int.Parse(args[2]);
                                int rank = int.Parse(args[3]);
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    int secureID = dbClient.getInt("SELECT id FROM jobs_ranks WHERE corp_id = '" + corpID + "' && job_rank = '" + rank + "'");
                                    string jobTitle = dbClient.getString("SELECT motto FROM jobs_ranks WHERE corp_id = '" + corpID + "' && job_rank = '" + rank + "'");
                                    dbClient.runQuery("UPDATE users SET corp_id = '" + corpID + "', job_rank = '" + rank + "', secure_id = '" + secureID + "' WHERE name = '" + User._Username + "'");
                                    Room.sendSaying(roomUser, "*hires " + User._Username + " as " + jobTitle + "*");
                                }
                            }
                            break;
                        }
                    #endregion
 
The one posted earlier on should work fine for emuRelease35.
Nope, im getting this error :



Im using that :pickall command :p

That :pickup command also didn't work
 
Here's a command that I wrote yesterday for someone that allows an administrator on the RP source that I released to hire anyone to a specific job.
PHP:
                    #region :superhire <user> <corpid> <rank>
                    case "superhire":
                        {
                            if (_Rank > 6)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                int corpID = int.Parse(args[2]);
                                int rank = int.Parse(args[3]);
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    int secureID = dbClient.getInt("SELECT id FROM jobs_ranks WHERE corp_id = '" + corpID + "' && job_rank = '" + rank + "'");
                                    string jobTitle = dbClient.getString("SELECT motto FROM jobs_ranks WHERE corp_id = '" + corpID + "' && job_rank = '" + rank + "'");
                                    dbClient.runQuery("UPDATE users SET corp_id = '" + corpID + "', job_rank = '" + rank + "', secure_id = '" + secureID + "' WHERE name = '" + User._Username + "'");
                                    Room.sendSaying(roomUser, "*hires " + User._Username + " as " + jobTitle + "*");
                                }
                            }
                            break;
                        }
                    #endregion

Oh ya you coded that command for me thanks for it but I see you released it :)
 
:arrestuser name time(Seconds)
Rastas Roleplay Server

Could you make it so it will send the user to certain co-ords, which I could set :)? And wen the time is over, Send them to hotel view.
 
Ok firstly the cmmd you want is kinda is i might code it for you but you just gtta edit the jailtimer to make it faster.

2. ofr your coord request you have to be specific wt room?



to: TehForgiven
 
Status
Not open for further replies.
Back