SqlCrash - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SqlCrash (
/showthread.php?tid=625153)
SqlCrash -
xUnknow - 28.12.2016
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 ....
Re: SqlCrash -
AndreiWow - 28.12.2016
Did you set up the database right? Also can you show me the code from one of your commands?
Re: SqlCrash -
4D1L - 28.12.2016
I think the function IsPlayerConnected will be very useful for you.
Re: SqlCrash -
Micko123 - 29.12.2016
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
Re: SqlCrash -
xUnknow - 29.12.2016
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 ?
Re: SqlCrash -
CutX - 29.12.2016
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