How to kick?
#1

Title says all
i got this script
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Registration", "Enter your password to register", "Ok", "Leave");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == 1){
      if(response){
         
      }
      else{
         //How to make him Kicked???
      }
   }
    return 0;
}
]

i want to make the player get kicked if he press Leave
Reply
#2

pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Registration", "Enter your password to register", "Ok", "Leave");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            // Do something
        }
        else
        {
            Kick(playerid);
        }
    }
    return 0;
}
Reply
#3

pawn Код:
E:\GTA - San Andreas\Pawn\gamemodes\SII Script.pwn(238) : error 021: symbol already defined: "ShowPlayerDialog"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
i'm sure ShowPlayerDialog is Not definded already
Reply
#4

search the line "forward ShowPlayerDialog" on your gamemode (no in includes) and delete. try this!
Reply
#5

there isn't any
Reply
#6

Bump anyone?
Reply
#7

Well, its KIND OF simple

Either 2 of your includes contain both ShowPlayerDialog, so delete either of them.
Reply
#8

i have only
pawn Код:
#include <a_samp>
#include <sscanf2>
includes i deleted Zcmd
still i got the problem.. same error
Reply
#9

Let me just put it this way
Delete either of the 2
Example:
Delete a_samp and leave only sscanf2
and so on
Reply
#10

pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Registration", "Enter your password to register", "Ok", "Leave");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            // Do something
        }
        else
        {
            Kick(playerid);
        }
    }
    return 0;
}
Try This, Untested
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)