Anti Team Hijack help - 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: Anti Team Hijack help (
/showthread.php?tid=459687)
Anti Team Hijack help -
FireWarrior101 - 24.08.2013
i use pteam
how do i script anti team hijack.
after 3 team hijacks the server will kick player
~May u help me
Re: Anti Team Hijack help -
Cypress - 24.08.2013
I'm sorry but what exactly you mean by this? You mean when a team mate will jack you out of car?
pawn Код:
new CarJack[MAX_PLAYERS];
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(ispassenger) SetVehicleParamsForPlayer(vehicleid, playerid, 0, 0);
else
{
new vehid_2 = -1, Float:Pos[3];
foreach(Player, i)
{
vehid_2 = GetPlayerVehicleID(i);
if(GetPlayerState(i) == PLAYER_STATE_DRIVER && vehicleid == vehid_2 && pTeam[playerid] == pTeam[i])
{
SetVehicleParamsForPlayer(vehicleid, playerid, 0, 1);
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1]+1.5, Pos[2]);
ClearAnimations(playerid);
SetVehicleParamsForPlayer(vehicleid, playerid, 0, 0);
CarJack[playerid]++;
if(CarJack[playerid] == 3)
{
Kick(playerid);
// Send Message
}
break;
}
}
}
return 1;
}
Re: Anti Team Hijack help -
FireWarrior101 - 24.08.2013
yes so it will exit him and give him warning
Re: Anti Team Hijack help -
FireWarrior101 - 24.08.2013
Check ur pm
Btw anyone can help me script a few things scriptor position promised