SA-MP Forums Archive
Jail/KIll BUG - 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: Jail/KIll BUG (/showthread.php?tid=581178)



Jail/KIll BUG - bimax999 - 11.07.2015

Hello all.
I have these bugs / additions : 1. When a player is killed he has wanted and is not automatically transferred from one prison only if you use the / arrest in place.
2.Where a player kills a cop , he gets people wanted + as chat faction governamentale not announced murder. thanks!


Re: Jail/KIll BUG - Michael B - 11.07.2015

Could you provide a better explanation please? I have a small clu on what you actually want to do, but I am not quite sure...


Re: Jail/KIll BUG - bimax999 - 11.07.2015

For example: If you wanted you and I will kill the police officer must fill in jail .
Not working.


Re: Jail/KIll BUG - Michael B - 11.07.2015

Do you mean that when a player kills a police officer, he would be jailed by the system?


Re: Jail/KIll BUG - bimax999 - 11.07.2015

kill a police officer , he cop to have closed automatically ! Look at the picture, when a man is killed it is automatically transferred to prison . http://minus.com/i/BxU2NDMfkz3d


Re : Jail/KIll BUG - KillerDVX - 11.07.2015

Call the OnPlayerDeath,

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
        new 
pname[24];
    new 
killername[24];
    new 
string[128];
        
GetPlayerName(playerid,pname,sizeof(pname));
    
GetPlayerName(killerid,killername,sizeof(killername));
if(
gTeam[killerid] == YOUR CRIMINAL TEAM && gTeam[playerid] == YOUR COP TEAM)
        {
                        
SendClientMessage(killerid,-1,"You killed a police officier and you'll be teleported to the jail");
                        
SetPlayerPos(killeridyour jail pos); 
                        
SetPlayerInterior(killeridTHE INTERIOR ID);
                        return 
1;
            }
      return 
1;

You can find the interior ID over here : http://weedarr.wikidot.com/interior

KillerDVX,



Re: Re : Jail/KIll BUG - bimax999 - 11.07.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
Call the OnPlayerDeath,

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
        new 
pname[24];
    new 
killername[24];
    new 
string[128];
        
GetPlayerName(playerid,pname,sizeof(pname));
    
GetPlayerName(killerid,killername,sizeof(killername));
if(
gTeam[killerid] == YOUR CRIMINAL TEAM && gTeam[playerid] == YOUR COP TEAM)
        {
                        
SendClientMessage(killerid,-1,"You killed a police officier and you'll be teleported to the jail");
                        
SetPlayerPos(killeridyour jail pos); 
                        
SetPlayerInterior(killeridTHE INTERIOR ID);
                        return 
1;
            }
      return 
1;

You can find the interior ID over here : http://weedarr.wikidot.com/interior

KillerDVX,
WORKK!! TANKS YOU

AND !!

Now you have : When a man kills a policeman and wanted to receive crime department to be announced : All suspect killed a police unit


Re : Jail/KIll BUG - KillerDVX - 11.07.2015

Please, explain more.




Re: Jail/KIll BUG - bimax999 - 11.07.2015

Want to Receive wanted one player kills another player or we cop

Add skype: darky.rebel1999 .. explain in chat.. skype. Tanks


Re : Jail/KIll BUG - KillerDVX - 11.07.2015

Ah you wan't to add a wanted level ? (The stars) ?

Simple ^^

Try this :

PHP код:
public OnPlayerDeath(playeridkilleridreason

        new 
pname[24]; 
    new 
killername[24]; 
    new 
string[128]; 
        
GetPlayerName(playerid,pname,sizeof(pname)); 
    
GetPlayerName(killerid,killername,sizeof(killername)); 
if(
gTeam[killerid] == YOUR CRIMINAL TEAM && gTeam[playerid] == YOUR COP TEAM
        { 
                        
SendClientMessage(killerid,-1,"You killed a police officier and you'll be teleported to the jail"); 
                        
SetPlayerPos(killeridyour jail pos);  
                        
SetPlayerInterior(killeridTHE INTERIOR ID); 
                        
SetPlayerWantedLevel(playeridYOUR VALUE);
                        return 
1
            } 
      return 
1

Don't forget to REP if it was helpful ^^

KillerDVX,