Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[Request] Fixing this command error.[Request]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Al-Santoro" data-source="post: 19944" data-attributes="member: 2264"><p><strong>Information:</strong></p><p>Right, first, I've made a new suicide command which can make you die instinctively, and makes you lose 200 credits (So people won't do it so often), and you automatically get sent to the hospital.. Not sure if the rest of the features works, but I've tried adding in where you can't use it when stunned, dead, or arrested.. However, when I tried adding that in, it came up with errors.. However, if any of you want, you could try to help me with this command ? ;] </p><p></p><p>[CODE]#region :die</p><p> case "suicide":</p><p> {</p><p> using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())</p><p> {</p><p> dbClient.runQuery("UPDATE user SET health = health = - '100' WHERE name = '" + _Username + "'");</p><p> dbClient.runQuery("UPDATE user SET credits = credits - '200' WHERE name = '" + _Username + "'");</p><p> {</p><p> if (roomUser.walkLock == true)</p><p> {</p><p> sendData("BK" + "Nice try, but you are either stunned or cuffed.");</p><p> }</p><p> else</p><p> {</p><p> int isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");</p><p> if (isArrested == 1)</p><p> {</p><p> Room.sendWhisper(roomUser, _Username, "Sorry, but you can't suicide when arrested.");</p><p> }</p><p> else</p><p> {</p><p> int isDead = dbClient.getInt("SELECT dead FROM users WHERE name = '" + _Username + "'");</p><p> if (isDead == 1)</p><p> {</p><p> Room.sendWhisper(roomUser, _Username, "Sorry, but you can't suicide when you're dead.");</p><p> }</p><p> </p><p> Room.sendSaying(roomUser, "*Takes out their pocket knife and slits their throat, causing suicide!*");</p><p> Room.sendSaying(roomUser, "*The ambulance successfully finds the body and returns the body to the hospital.*");</p><p> sendData("BK" + "You've just caused suicide and lost 200cs! We pray for you. ;[");</p><p> _Mission = "[Dead]Committed Suicide!";</p><p> refreshAppearance(false, true, true);</p><p> }</p><p> }</p><p> break;</p><p> #endregion[/CODE]</p><p></p><p>Hopefully someone is able to help out. ;]</p></blockquote><p></p>
[QUOTE="Al-Santoro, post: 19944, member: 2264"] [B]Information:[/B] Right, first, I've made a new suicide command which can make you die instinctively, and makes you lose 200 credits (So people won't do it so often), and you automatically get sent to the hospital.. Not sure if the rest of the features works, but I've tried adding in where you can't use it when stunned, dead, or arrested.. However, when I tried adding that in, it came up with errors.. However, if any of you want, you could try to help me with this command ? ;] [CODE]#region :die case "suicide": { using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dbClient.runQuery("UPDATE user SET health = health = - '100' WHERE name = '" + _Username + "'"); dbClient.runQuery("UPDATE user SET credits = credits - '200' WHERE name = '" + _Username + "'"); { if (roomUser.walkLock == true) { sendData("BK" + "Nice try, but you are either stunned or cuffed."); } else { int isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'"); if (isArrested == 1) { Room.sendWhisper(roomUser, _Username, "Sorry, but you can't suicide when arrested."); } else { int isDead = dbClient.getInt("SELECT dead FROM users WHERE name = '" + _Username + "'"); if (isDead == 1) { Room.sendWhisper(roomUser, _Username, "Sorry, but you can't suicide when you're dead."); } Room.sendSaying(roomUser, "*Takes out their pocket knife and slits their throat, causing suicide!*"); Room.sendSaying(roomUser, "*The ambulance successfully finds the body and returns the body to the hospital.*"); sendData("BK" + "You've just caused suicide and lost 200cs! We pray for you. ;["); _Mission = "[Dead]Committed Suicide!"; refreshAppearance(false, true, true); } } break; #endregion[/CODE] Hopefully someone is able to help out. ;] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Request] Fixing this command error.[Request]
Top