SA-MP Forums Archive
Player kick problem - 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: Player kick problem (/showthread.php?tid=503200)



Player kick problem - Amoucnobi - 28.03.2014

Hi Guys i have 1 problem. When i am using CMD: /kick

gamemode says me : Player not found .. whats problem guys? can any 1 Help me?


Re: Player kick problem - Bingo - 28.03.2014

Show your /kick cmd?


Re: Player kick problem - Amoucnobi - 28.03.2014

Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
Show your /kick cmd?
how can i show you ? i am using cmd : /kick and gamemode says that Player not found


Re: Player kick problem - Bingo - 28.03.2014

Quote:
Originally Posted by Amoucnobi
Посмотреть сообщение
how can i show you ? i am using cmd : /kick and gamemode says that Player not found
Yes in your gamemode, copy the /kick code.


Re: Player kick problem - Nucky - 28.03.2014

You need to post more info. Try to look for your command line in the gamemode script
Are you using ZCMD?


Re: Player kick problem - Amoucnobi - 28.03.2014

PHP код:
    else if(strcmp(cmd"/kick"true) == 0)
    {
        if (
PlayerInfo[playerid][pAdmin] >= 1)
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)) return    SendClientMessage(playeridCOLOR_WHITE"Sheiyvanet: /kick [id] [причина]");
            if (
dostup[playerid] != 1) return ShowPlayerDialog(playerid,2934,DIALOG_STYLE_INPUT,"Доступ администратора","Введи свой key в окошко и нажми 'Ок'","Ок","Отмена");
            
giveplayerid ReturnUser(tmp);
            if (
PlayerInfo[playerid][pLevel] >= && PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(
PlayerInfo[giveplayerid][pAdmin] > 0) return SendClientMessage(playeridCOLOR_GRAD2"Администратор не может быть кикнут!");
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        new 
length strlen(cmdtext);
                        while ((
idx length) && (cmdtext[idx] <= ' '))
                        {
                            
idx++;
                        }
                        new 
offset idx;
                        new 
result[64];
                        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                        {
                            
result[idx offset] = cmdtext[idx];
                            
idx++;
                        }
                        
result[idx offset] = EOS;
                        if(!
strlen(result)) return SendClientMessage(playeridCOLOR_WHITE"Sheiyvanet: /kick [id] [reason]");
                        new 
yearmonth,day;
                        
getdate(yearmonthday);
                        
format(stringsizeof(string), "Администратор %s кикнул %s. Причина: %s"sendername,giveplayer, (result));
                        
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        
Kick(giveplayerid);
                        return 
1;
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"[Shecdoma] Motamashe Ver Moidzebna!");
            }
        }
        return 
1;
    } 



Re: Player kick problem - Bingo - 28.03.2014

Are you sure that you are using correct syntax? /kick [id] [reason]
Eg: - /kick 0 test


Re: Player kick problem - jakejohnsonusa - 28.03.2014

Can you translate those into English? I can't tell which one is saying that the player isn't connected...


Re: Player kick problem - Amoucnobi - 28.03.2014

Quote:
Originally Posted by jakejohnsonusa
Посмотреть сообщение
Can you translate those into English? I can't tell which one is saying that the player isn't connected...
sure i can ! wait pls


Re: Player kick problem - Amoucnobi - 28.03.2014

Quote:
Originally Posted by jakejohnsonusa
Посмотреть сообщение
Can you translate those into English? I can't tell which one is saying that the player isn't connected...
can i add second /kick cmd? or not? What can i to do ?