/q cmd function.
#1

Hi guyz,
Anyone here knows the function of /q cmd.
I need to create a cmd where it works exactly like /q or /quit cmd.
I created a cmd /logout.
But i used Kick(playerid); function.
Is there any other way which works exactly like /quit cmd?
Reply
#2

Bump, looking for same thing (trying to create few /q variants). My one thought would be force-crashing client, but well - it's neither elegant nor wise.
Reply
#3

Not that I'd think of, no.
Reply
#4

Try this:

Код:
if(strcmp(cmdtext,"/logout", true) == 0)
{
    GameTextForPlayer(playerid, "іЈіІўЈ¬ІўІі~wwwwwwwwww",66666000, 6);
    Kick(playerid);
    return true;
}
Reply
#5

pawn Код:
SetPlayerSkin(playerid, 9999);
to crash a player.
Reply
#6

@Marlon_Lorran He don't want a kick command .. He need a command who close the game.
Reply
#7

@HellSphinX ) Yeah , it work's with skin , but it give me a real crash )
Reply
#8

Quote:
Originally Posted by farCry.xD
Посмотреть сообщение
@Marlon_Lorran He don't want a kick command .. He need a command who close the game.
but the command I did it shut down the server in conjunction with the kick.

If in doubt, test the command.
Reply
#9

hmm Yes you are right , but is the same thing like Setplayerskin(playerid , 99999); ... And the crash is from the letters ..
Reply
#10

Well I would try it like this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext){
    if(!strcmp("/logout", cmdtext, true)){
        return OnPlayerCommandText(playerid, "/q");
    }
    return 0;
}
This is the most elegant way I can imagine, just dunno if it works how I expect.

If /q is a command in itself then it will work, but I fear that /q is embedded in the samp application itself.

Let me know if it worked.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)