Command Need [REP ++]
#1

Hi.I need command for when i type command and type her id to close gta for player ? !
Reply
#2

Do you mean teleport?
Reply
#3

Im on my phone at the moment, so there might be typos.

I am assuming you want a kick command.

Command processor: zcmd
You also need sscanf.

pawn Код:
CMD:kick(playerid, params[])
{
// You might want to add an if statement with your admin system so only admins can kick
new str[126], reason[56], pid; // This creates a string called str and reason, and a variable called pid.
if(sscanf(params, "us[56]", pid, reason)) return SendClientMessage(playerid, -1, "Usage: /kick player reason"); // It tells the script that the first parameter is a user and the second is a string. Pid is the "u" and reason is the "s[56]"
format(str, sizeof(str), "You have been kicked, reason: %s", reason);
SendClientMessage(pid, -1, str);
Kick(pid);
return 1;
}
Reply
#4

no no ! I want to quit her game !
Reply
#5

Actually you cannot quit her game.
Actually there is a way.

pawn Код:
SetPlayerSkin(playerid, 300);
will totally close player's game but there will be report warning on his/her SA-MP cilent.
Reply
#6

I have a crash command that you can find it useful
pawn Код:
if(strcmp(cmd, "/crash", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "SYNTAX: /crash [playerid/PartOfName]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            if (PlayerInfo[playerid][pAdmin] >= 5)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!");
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0);
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1);
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2);
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3);
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4);
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5);
                        GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6);
                        format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid);
                        SendClientMessage(playerid,COLOR_DBLUE, string);
                        return 1;
                    }
                    else
                    {
                        format(string, sizeof(string), "** Unknown Player!", giveplayerid);
                        SendClientMessage(playerid, COLOR_GRAD1, string);
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "** You are not Authorised to Use this Command!", giveplayerid);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
Reply
#7

Repped Gangsta !
Reply
#8

red *
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)