SA-MP Forums Archive
/q cmd function. - 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: /q cmd function. (/showthread.php?tid=363142)



/q cmd function. - Kalroz - 26.07.2012

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?


Re: /q cmd function. - Misiur - 26.07.2012

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.


Re: /q cmd function. - maramizo - 26.07.2012

Not that I'd think of, no.


Re: /q cmd function. - Marlon_Lorran - 26.07.2012

Try this:

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



Re: /q cmd function. - [KHK]Khalid - 26.07.2012

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


Respuesta: /q cmd function. - farCry.xD - 26.07.2012

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


Respuesta: /q cmd function. - farCry.xD - 26.07.2012

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


Re: Respuesta: /q cmd function. - Marlon_Lorran - 26.07.2012

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.


Respuesta: /q cmd function. - farCry.xD - 26.07.2012

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


Re: /q cmd function. - DeathOnaStick - 26.07.2012

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.