car kick does not work - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: car kick does not work (
/showthread.php?tid=72074)
car kick does not work -
CJ101 - 05.04.2009
http://pastebin.com/m66c6aca0
Re: car kick does not work -
ICECOLDKILLAK8 - 05.04.2009
So they get kicked for entering a car?, Then why even add that car?
Re: car kick does not work -
CJ101 - 05.04.2009
i dont, but im trying to make an a/c here.
Re: car kick does not work -
Kinetic - 06.04.2009
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.
Re: car kick does not work -
propilot - 06.04.2009
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]
Re: car kick does not work -
CJ101 - 06.04.2009
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);
}
}
}
Re: car kick does not work -
ICECOLDKILLAK8 - 06.04.2009
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);
}
}
}
Re: car kick does not work -
Kinetic - 06.04.2009
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.