Possible to overrule '/q' ???
#1

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.
Reply
#2

Not possible.
Reply
#3

Doubt it. Would be super-stupid.
Reply
#4

You can punish them upon re-entry instead of blocking /q command (which to my knowledge isn't possible)
Reply
#5

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.
Reply
#6

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;
}
Reply
#7

It's embedded into the client. not possible.
Reply
#8

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.
Reply
#9

Just code it so they will be auto-punished. Simple.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)