[Rel] [LIVE] RP Emergency [LIVE]
Ok Here it goes:
1. Open usermanager.cs in Source>Managers>usermanager.cs
2. Search 'SendToCop' (with no quotes)
3. Underneath that add:
PHP Code:
public static void sendToDoc(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 == 2 && getWorking == 1)
{
User.sendData(Data);
}
}
}
}
catch { }
}
4. Now open up virtualuser.cs,and search :911.
5. Underneath :Emergency add:
PHP Code:
#region :Emergency <message>
case "Emergency":
{
if (copCdLooper != null)
{
sendData("BK" + "Sorry,but you have to wait until a officer on duty replies.");
}
else
{
int isArrested;
int copID;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
copID = dbClient.getInt("SELECT id FROM police_call");
}
if (isArrested == 0)
{
string cfhMessage = Text.Substring(3);
Room.sendSaying(roomUser, "*calls the hospital for help*");
userManager.sendToDoc(1, false, "BK" + "Caller: " + _Username + "\rMessage: " + cfhMessage + "\rRoom ID: " + _roomID);
}
}
break;
}
#endregion
Re: [Rel] [Harsh] Hospital Calls [Harsh]
What's the release ?
r60 or RP ?
Re: [Rel] [Harsh] Hospital Calls [Harsh]
Dude gtfo out of here with this bull shit release..
isn't even yours to release in the first place.
Re: [Rel] [Harsh] Hospital Calls [Harsh]
You should do:
:911 Hospital
:911 Police
Also this release is not even yours.
Re: [Rel] [Harsh] Hospital Calls [Harsh]
:911 sends data saying Police Or Ambulance? then you add a wordfilter thingy so they say Ambulance not like a command like :Ambulance just ambulance i had that coded in my rp server long ago. i'll see if i still got it
Re: [Rel] [Harsh] Hospital Calls [Harsh]
PHP Code:
#region :911 <message>
case "911": //this gives ya a choice
{
int isArrested;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
}
string who = args[1];
string message = args[2];
{
if (isArrested == 1)
{
sendData("BK" + "Sorry but you are arrested, and cannot call the police nor the hospital!");
break;
}
else
if (who = null)
{
sendData("BK" + "Hello please remember to say (:911 [police/hospital] message )");
}
if (who == "police")
{
userManager.sendToCop(1, false, "BK" + "Caller: " + _Username + "\rMessage: " + message + "\rRoom ID: " + _roomID);
Room.sendSaying(roomUser, "*calls the cops for help*");
}
if (who == "hospital")
{
userManager.sendToDoc(1, false, "BK" + "Caller: " + _Username + "\rMessage: " + message + "\rRoom ID: " + _roomID);
Room.sendSaying(roomUser, "*calls the hospital for help*");
}
}
break;
}
#endregion
this gives you a choice.. of.. if you don't call for either it will tell you TO call for one of em
and when you do the correct thing happens
Re: [Rel] [Harsh] Hospital Calls [Harsh]
This was my release on another forum; mod please close until he credits meh.
Edit: nvm..
Re: [Rel] [Harsh] Hospital Calls [Harsh]
Re: [Rel] [Harsh] Hospital Calls [Harsh]
your claiming someones work? Bad idea now your gonna get fucked by all of the coders lol
Re: [Rel] [Harsh] Hospital Calls [Harsh]
harsh what a fail, you left copID in dere :P
Re: [Rel] [Harsh] Hospital Calls [Harsh]
i have my own emergency code im going to edit it with this
Re: [Rel] [LIVE] RP Emergency [LIVE]
dude you arent cool.. you just changed it from "411" to "Emergency"
Re: [Rel] [LIVE] RP Emergency [LIVE]
Please stop with the failed codes. only non failed code i seen in this thread is cobes command.
Re: [Rel] [LIVE] RP Emergency [LIVE]
Stop claiming others work when your good enough to be able to release something that hasnt been released then come see us (:
Re: [Rel] [Harsh] Hospital Calls [Harsh]
Quote:
Originally Posted by
LIVE
Ok Here it goes:
1. Open usermanager.cs in Source>Managers>usermanager.cs
2. Search 'SendToCop' (with no quotes)
3. Underneath that add:
PHP Code:
public static void sendToDoc(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 == 2 && getWorking == 1)
{
User.sendData(Data);
}
}
}
}
catch { }
}
4. Now open up virtualuser.cs,and search :911.
5. Underneath :Emergency add:
PHP Code:
#region :Emergency <message>
case "Emergency":
{
if (copCdLooper != null)
{
sendData("BK" + "Sorry,but you have to wait until a officer on duty replies.");
}
else
{
int isArrested;
int copID;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
copID = dbClient.getInt("SELECT id FROM police_call");
}
if (isArrested == 0)
{
string cfhMessage = Text.Substring(3);
Room.sendSaying(roomUser, "*calls the hospital for help*");
userManager.sendToDoc(1, false, "BK" + "Caller: " + _Username + "\rMessage: " + cfhMessage + "\rRoom ID: " + _roomID);
}
}
break;
}
#endregion
Quote:
Originally Posted by
Shacobesaurus™
harsh what a fail, you left copID in dere :P
@LIVE, Please give me Credits for this as i coded the base of it (the SendtoDoc and the command) you just edited the command to :emergency, Reported to mod.
@Cobe i was tired :P
Re: [Rel] [LIVE] RP Emergency [LIVE]
Guys, You're f**king stupid.. If anyone needs credits, It's RastaLulz, WOW, HE TOOK THE SENDTOCOP VOID AND THE 911 COMMAND! he's still done something..
That's what most releases are like this. Besides if it wern't for Rasta you wouldn't even have a decent RP server, so just let Live be..
God -.- selfish twats. (infraction here I come!).