SqlCrash
#1

Hi , My Problem Is When Im Use A commands Like /check(for admins) or /number (player phone number) on Offline Player ( Player Didnt Login Into The Server ) Server Cannot Load Any Data About That Offline Player And Sql Will be Crash And Commands All Be Disable And All Can See They're Chats ( Normal = Players Should Just See The Near Player Messeages) / My idea for fixing This Is Block Are Command For Another Player To One Offline Player .
For Example : ID 1 = offline Player And id 2 = Online Player | id 2 use / number on id 1 and Server Say To him "This Player Is Offline" But I dont Know How Should I do This . anybody can help me ?

"I Just Want Block The Commands For OnlinePlayers On Offline Players"


Sorry For My Bad English ....
Reply
#2

Did you set up the database right? Also can you show me the code from one of your commands?
Reply
#3

I think the function IsPlayerConnected will be very useful for you.
Reply
#4

Quote:
Originally Posted by 4D1L
Посмотреть сообщение
I think the function IsPlayerConnected will be very useful for you.
Or you can just use foreach and you don't have to check IsPlayerConnected
Reply
#5

i Was Set If(IsPlayerConnected Before My All Commands / But I was Said Online Players Use Command On Offline Player I want Disable Commands For Onlineplayers On Offline Players Not Just OnPlayerConnect(It's For Himself not offlineplayer) "I Just Want Block The Commands For OnlinePlayers On Offline Players"

This Is What I Need : Online Players Can not Use Comamnd On Offline Players

How Should I Do This ?
Reply
#6

Quote:
Originally Posted by xUnknow
Посмотреть сообщение
i Was Set If(IsPlayerConnected Before My All Commands / But I was Said Online Players Use Command On Offline Player I want Disable Commands For Onlineplayers On Offline Players Not Just OnPlayerConnect(It's For Himself not offlineplayer) "I Just Want Block The Commands For OnlinePlayers On Offline Players"

This Is What I Need : Online Players Can not Use Comamnd On Offline Players

How Should I Do This ?
it is not enough to just check if the person typing the command is connected,
more importantly you have to check if the person that's being affected by the command is actually online

so, just check your target playerid using IsPlayerConnected
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)