[SOLVED] Rasta Rp Command

Status
Not open for further replies.

Dayron1234

Rapnameiszero,cuzIhavezero,toleranceforidiots
Jun 30, 2010
772
35
I am having trouble coding a command its :superhire maybe some of have heard of it or not but i want it like this :superhire (corpid) (corprank) for example :superhire 1 for nypd 4 for commissoner rank like that any help?
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,921
Rasta Rp Command

Should work. I didn't test it.
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
 

Dayron1234

Rapnameiszero,cuzIhavezero,toleranceforidiots
Jun 30, 2010
772
35
Rasta Rp Command

:D thanks rasta its a good thing you are a coder :D and can you code me :sex command please lol if its not any more trouble tho :sex (username)
 
Status
Not open for further replies.

Users who are viewing this thread

Top