car kick does not work
#1

http://pastebin.com/m66c6aca0
Reply
#2

So they get kicked for entering a car?, Then why even add that car?
Reply
#3

i dont, but im trying to make an a/c here.
Reply
#4

you should define which state they change to.

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
  if(newstate == 2)
  {
    //do the stuff here.
  }
  return 1;
}
also you need to toggle them uncontrolable before you kick them or I dont think it will make them uncontrollable.
Reply
#5

Quote:
Originally Posted by Kinetic
you should define which state they change to.

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
  if(newstate == 2)
  {
    //do the stuff here.
  }
  return 1;
}
also you need to toggle them uncontrolable before you kick them or I dont think it will make them uncontrollable.
[pawno]public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == 2)
{
You Got Kicked Out Of The Server Because You Entered This Car!
}
return 1;
}
[/pawno]
Reply
#6

code still does nothing

Код:
public OnPlayerStateChange(playerid,newstate,oldstate)

{

  new name[MAX_PLAYER_NAME];

  GetPlayerName(playerid, name, sizeof(name));

  new vm = GetVehicleModel(playerid);

   if (newstate == 2)
  {

    if (vm == 520 || vm == 425)

    {
 
    TogglePlayerControllable(playerid,false);

    TextDrawShowForPlayer(playerid,Textdraw2);

    Kick(playerid);

    
    }
  }

 
}
Reply
#7

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
  if (newstate == PLAYER_STATE_DRIVER)
  {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    new v = GetVehicleModel(playerid);// Is this meant to be Vehicle ID not Model?
    if (v == 520 || v == 425)
    {
      TogglePlayerControllable(playerid,0);
      TextDrawShowForPlayer(playerid,Textdraw2);
      Kick(playerid);
    }
  }
}
Reply
#8

Just so you know, if you kick the player from the server, the text draw is gonna disapear... the only thing you really got on disconnect that the player will see is the SendClientMessage.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)