Auto-Jail -
Mititel - 04.09.2015
Hi.
How can I make when you wanted and you / q when you're chased by police to jail automatically give you after you reconnect?
Re: Auto-Jail -
Variable™ - 04.09.2015
You can't request scripts, this section is for scripting help ONLY.
Re: Auto-Jail -
MBilal - 05.09.2015
You need to set Jail varaible to 1 when some budy /q and when he join call the jail varaible which is 1 and
if his jail varaible is 1 set his position to jail hope you understand
Re: Auto-Jail -
Devon007 - 05.09.2015
Try It Like This
Код:
if (IsSuspectInRangeOfPolice3(playerid) && PlayerInfo[playerid][pWantedLevel] > 5)
{
PlayerInfo[playerid][pJailed] =1;
}
Код:
if (IsSuspectInRangeOfPolice3(playerid)
This Will Check If That Criminal Is In Range Of Police
Код:
PlayerInfo[playerid][pWantedLevel] > 5
If The Player Is Criminal And Is In Range Of Police
Код:
PlayerInfo[playerid][pJailed] =1;
And If He Quit He Will Be Jailed
Note:You Need To Create Like This Depending on your gamemode
Dont Forget To Place It Under OnPlayerDisconnect
Re: Auto-Jail -
Mititel - 05.09.2015
Such as?
Код:
public IsSuspectInRangeOfPolice3(playerid)
{
return 1;
}
And the public to put something?
IsPlayerInRangeOfPoint(playerid, 15.0, x, y, z
?
Re: Auto-Jail -
Devon007 - 05.09.2015
Код:
stock IsSuspectInRangeOfPolice3(suspectid)
{
new Float:suspectX, Float:suspectY, Float:suspectZ;
GetPlayerPos(suspectid, suspectX, suspectY, suspectZ);
for (new i = 0; i < GetMaxPlayers(); i++)
{
if (IsPlayerConnected(i) && i != suspectid && PlayerInfo[i][pSpawn] == 1 && PlayerInfo[suspectid][pBribeExpireTime] == 0)
{
if (PlayerInfo[i][pSkill] == SKILL_COP || PlayerInfo[i][pVigilante] == 1)
{
if (GetPlayerVirtualWorld(suspectid) == 0)
{
if (IsPlayerInRangeOfPoint(i, 200.0, suspectX, suspectY, suspectZ))
{
return 1;
}
}else{
if (IsPlayerInRangeOfPoint(i, 200.0, suspectX, suspectY, suspectZ) || IsPlayerInRangeOfPoint(i, 100.0, PlayerInfo[suspectid][pLastOutSideX],PlayerInfo[suspectid][pLastOutSideY],PlayerInfo[suspectid][pLastOutSideZ]))
{
return 1;
}
}
}
}
}
return 0;
}
Something Like This
Re: Auto-Jail -
Mititel - 05.09.2015
Okay, if I am not this:
pSkill, pVigilante , pBribeExpireTime I delete them?
And..
pLastOutSideX, pLastOutSideY, pLastOutSideZ
Thanks for help +rep