Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 16:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Add text with Kick User.

Discussion on Add text with Kick User. within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
Add text with Kick User.

Hi elitepvpers,

I am working with the SendAPIcmd command from Sedrika's webshop.

What i am now doing is adding an Kick command for an player.

Now what i am not getting accomplished is that an player that has been kicked sees an message.

I have atm this

Code:
else if( bi2.dwCommand == 103 ) //KickPlayer
		{
			pUser->AddText("You have been kicked from the game.");
			g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos(), pUser->GetLayer() );
			g_DPCoreClient.SendKillPlayer( pUser->m_idPlayer, pUser->m_idPlayer );
		}
As you can see i put the AddText in front of the KillPlayer command.
But when the player is getting kicked it doesnt show the message at all.

Any tips for this?

With kind regards.
raventh1984 is offline  
Old 12/10/2014, 14:19   #2



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
The user is being kicked to fast. Try adding a little delay.

Code:
else if( bi2.dwCommand == 103 ) //KickPlayer
		{
			pUser->AddText("You have been kicked from the game.");
			Sleep(100);
			g_dpDBClient.SavePlayer( pUser, pWorld->GetID(), pUser->GetPos(), pUser->GetLayer() );
			g_DPCoreClient.SendKillPlayer( pUser->m_idPlayer, pUser->m_idPlayer );
		}
Sedrika is offline  
Thanks
1 User
Old 12/10/2014, 18:06   #3
 
elite*gold: 0
Join Date: Aug 2009
Posts: 228
Received Thanks: 26
Or you can change your text to a Message Box (ingame).
julioclitwin is offline  
Old 12/10/2014, 18:39   #4
 
Schulzie's Avatar
 
elite*gold: 317
Join Date: Jul 2013
Posts: 426
Received Thanks: 305
interessant wäre noch, wenn man noch dazu schreibt, wer den spieler gekickt hat
Schulzie is offline  
Old 12/10/2014, 19:04   #5
 
Marc~'s Avatar
 
elite*gold: 0
Join Date: Sep 2011
Posts: 677
Received Thanks: 390
Lässt sich das nicht anhand des alten Guides von Pumbaaa ableiten?

Marc~ is offline  
Old 12/10/2014, 19:18   #6
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
Doing Sleep() on a server isn't a great idea:

Quote:
Suspends the execution of the current thread until the time-out interval elapses.
Avalion is offline  
Thanks
1 User
Old 12/10/2014, 21:17   #7

 
/Aiden\'s Avatar
 
elite*gold: 1825
Join Date: Apr 2014
Posts: 1,073
Received Thanks: 1,359
Quote:
Originally Posted by Avalion View Post
Doing Sleep() on a server isn't a great idea:
As far as i know every User has it´s own Serversided thread. Should not be a problem that this thread stops for 100 ms. Other players shouldn´t notice this at all.
/Aiden\ is offline  
Old 12/10/2014, 23:13   #8
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
Quote:
Originally Posted by Schulzie View Post
interessant wäre noch, wenn man noch dazu schreibt, wer den spieler gekickt hat
That can easily be done. I just need to add an new line inside the php file.

And then i can do something like this

pUser->AddText(pUser->m_idPlayer has kicked you from the game) and for the kick off course using

g_DPCoreClient.SendKillPlayer( bi2.dwTargetId, bi2.dwTargetId );

or

g_DPCoreClient.SendKillPlayer(pUser->m_idPlayer, bi2.dwTargetId );
raventh1984 is offline  
Reply


Similar Threads Similar Threads
[PHP & MySql] Text auf Homepage Posten über User
12/08/2012 - Web Development - 5 Replies
Hey leuts ich bins mal wieder und habe eine frage über php & mysql... unzwar bin ich grade an meiner homepage und will nicht immer in "index.php" rein und die TExte Bearbeiten... Gibt es ein Tool z.b. Text Erstellen: "Überschrifft" "Text" Texte anzeigen lassen:
nach auswahl bekommen user kick
01/06/2012 - Metin2 Private Server - 5 Replies
Wie oben steht ich benutze meinen eigenen client und sie meinen
User bekommen nach charauswahl kick!
08/07/2011 - Metin2 Private Server - 14 Replies
Hey epvp hab ein kleines prob mit meinen hamachi server ich kann zwar connecten und zocken etc aber meine user nicht den die bekommen nach char immer kick. Pong ist richtig bekommt auch THx :)



All times are GMT +1. The time now is 16:20.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.