SA-MP Forums Archive
[HELP] Police and Civil jail - 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: [HELP] Police and Civil jail (/showthread.php?tid=341365)



[HELP] Police and Civil jail - c0GI - 10.05.2012

Hy I wanted to make a script for policeman ande civils!

I use a RP mod!

When Policemen kill the civils with no wanted level/points, the policeman goes to this position
Код:
1326.2231,-911.3596,49.0754
Can anybody make this


Re: [HELP] Police and Civil jail - Squirrel - 10.05.2012

new jail;
jail = 1326.2231,-911.3596,49.0754

OnPlayerDeath add code bellow
PHP код:
If(GetPlayerTeam(killeridTEAM_POLICE)
{
         
SetPlayerPos(playeridjail);
         
etc... 



Re: [HELP] Police and Civil jail - c0GI - 10.05.2012

Ouu thanks <3


Re: [HELP] Police and Civil jail - c0GI - 10.05.2012

Ou no :O

You must tell me how to do with NO WANTED POINTS!!! no just every kill


Re: [HELP] Police and Civil jail - [MG]Dimi - 10.05.2012

pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(GetPlayerTeam(killerid) == TEAM_POLICE) //you must have defined TEAM_POLICE or change it to whatever you use to determine team
    {
        if(GetPlayerWantedLevel(playerid) < 1) // killed player isn't wanted
        {
            SetPlayerPos(killerid,1326.2231,-911.3596,49.0754); // set his pos to jail
            SendClientMessage(killerid,-1,"You've been jailed for killing innocent player!"); // inform him why he is jailed
        }
    }
    return 1;
}