Possible to overrule '/q' ??? -
Dubya - 28.07.2013
Hello, I am working on a role-play script, and I am wondering if it is possible if I can make it so that '/q' (exits client) to check if they are in a police car, or tied, or being dragged, something like that, and for it to not exit the client if it does that.
Re: Possible to overrule '/q' ??? -
-Prodigy- - 28.07.2013
Not possible.
Re: Possible to overrule '/q' ??? -
EvanA - 28.07.2013
Doubt it. Would be super-stupid.
Re: Possible to overrule '/q' ??? -
[ABK]Antonio - 28.07.2013
You can punish them upon re-entry instead of blocking /q command (which to my knowledge isn't possible)
Re: Possible to overrule '/q' ??? -
MP2 - 28.07.2013
You can not
prevent players from using /q, but if they are doing something such as their vehicle is on fire, or they are falling, or are about to be arrested etc. when they /q, you could punish them when they return.
Re: Possible to overrule '/q' ??? -
Income - 28.07.2013
Quote:
Originally Posted by Dubya
Hello, I am working on a role-play script, and I am wondering if it is possible if I can make it so that '/q' (exits client) to check if they are in a police car, or tied, or being dragged, something like that, and for it to not exit the client if it does that.
|
You can check those things at the public OnPlayerDisconnect.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
if(/* is player tied var*/)
{
Kick(playerid);
}
return 1;
}
Quote:
Originally Posted by MP2
You can not prevent players from using /q, but if they are doing something such as their vehicle is on fire, or they are falling, or are about to be arrested etc. when they /q, you could punish them when they return.
|
What are the chances of this snippet to work(?)
pawn Код:
CMD:q(playerid, params[])
{
if(/* is player tied */) return SendClientMessage(playerid, 0xAFAFAFAA, "Error: You cannot quit during being tied!");
return 1;
}
Re: Possible to overrule '/q' ??? -
Mitchy - 28.07.2013
It's embedded into the client. not possible.
Re: Possible to overrule '/q' ??? - Riddy - 28.07.2013
Quote:
Originally Posted by Income
You can check those things at the public OnPlayerDisconnect.
pawn Код:
public OnPlayerDisconnect(playerid, reason) { if(/* is player tied var*/) { Kick(playerid); } return 1; }
What are the chances of this snippet to work(?)
pawn Код:
CMD:q(playerid, params[]) { if(/* is player tied */) return SendClientMessage(playerid, 0xAFAFAFAA, "Error: You cannot quit during being tied!"); return 1; }
|
Definitely not.
Cient-sided commands cannot be changed from server-sided shit.
Re: Possible to overrule '/q' ??? -
EvanA - 29.07.2013
Just code it so they will be auto-punished. Simple.
Re: Possible to overrule '/q' ??? -
MP2 - 29.07.2013
Quote:
Originally Posted by Income
pawn Код:
public OnPlayerDisconnect(playerid, reason) { if(/* is player tied var*/) { Kick(playerid); } return 1; }
|
So basically - if the player is disconnecting - disconnect them. Please tell me you understand how silly that sounds.
Quote:
Originally Posted by Income
What are the chances of this snippet to work(?)
pawn Код:
CMD:q(playerid, params[]) { if(/* is player tied */) return SendClientMessage(playerid, 0xAFAFAFAA, "Error: You cannot quit during being tied!"); return 1; }
|
Absolutely 0. Client-side commands are processed in the SA-MP client before OnPlayerCommandText is called (which it isn't for client commands). Would be nice though.