SA-MP Forums Archive
A Little Help on jailing somthing | +rep - 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: A Little Help on jailing somthing | +rep (/showthread.php?tid=406476)



A Little Help on jailing somthing | +rep - Mr.Faqahat - 10.01.2013

Hello, i use this code to kick a Player if he heli kill how can i make so that he will get jailed for 1 min instead of going to jail
Quote:

if(reason == 50)
{
new Name[MAX_PLAYER_NAME], Message[128];
GetPlayerName(killerid, Name, sizeof(Name));
format(Message, sizeof(Message), "{FFAF00}[KICK]:{F81414}%s(%d) {FFFFFF}has been KICKED for Heli Kill.", Name, playerid);
SendClientMessageToAll(COLOR_RED,Message);
RemovePlayerFromVehicle(killerid);
SetPlayerPos(killerid,197.6661,173.8179,1003.0234) ;
SetPlayerInterior(killerid,3);
SetCameraBehindPlayer(killerid);
SetPlayerSpecialAction(killerid,SPECIAL_ACTION_HAN DSUP);
GameTextForPlayer(killerid,"~r~Kicked For Heli Kill", 10000, 0);
SendClientMessage(killerid,COLOR_RED, "You Have Been automaticly Kicked For Helikill/HeliBlades.");
Kick(killerid);
}

Thanks in Advance


Re : A Little Help on jailing somthing | +rep - yusei - 10.01.2013

PHP код:
if(reason == 50)
 {
 new 
Name[MAX_PLAYER_NAME], Message[128];
 
GetPlayerName(killeridNamesizeof(Name));
 
format(Messagesizeof(Message), "{FFAF00}[<Jail]:{F81414}%s(%d) {FFFFFF}has been Jailed for Heli Kill."Nameplayerid);
 
SendClientMessageToAll(COLOR_RED,Message);
 
RemovePlayerFromVehicle(killerid);
 
SetPlayerPos(killerid,197.6661,173.8179,1003.0234) ;
 
SetPlayerInterior(killerid,3);
 
SetCameraBehindPlayer(killerid);
 
SetPlayerSpecialAction(killerid,SPECIAL_ACTION_HAN DSUP);
 
GameTextForPlayer(killerid,"~r~Jailed For Heli Kill"100000);
 
SendClientMessage(killerid,COLOR_RED"You Have Been automaticly Jailed For Helikill/HeliBlades.");
 
SetTimerEx("jail"60000false"i"killerid); // 1 min
 

PHP код:
forward jail(killerid);
public 
jail(killerid)
{
   
SetPlayerPos(killerid1543.7990 -1676.8492 12.5440);
   
SetPlayerInterior(killerid,0);
   return 
1;




Re: A Little Help on jailing somthing | +rep - DaRk_RaiN - 10.01.2013

This will put him back to the place he was before the heli kill.
If it doesn't work PM me.
pawn Код:
if(reason == 50)
    {
    new Float:x, Float:y, Float:z;
    new Name[MAX_PLAYER_NAME], Message[128];
    GetPlayerName(killerid, Name, sizeof(Name));
    format(Message, sizeof(Message), "{FFAF00}[JAIL]:{F81414}%s(%d) {FFFFFF}has been Jailed(1 minute) for Heli Kill.", Name, playerid);
    SendClientMessageToAll(COLOR_RED,Message);
    RemovePlayerFromVehicle(killerid);
    SetPlayerPos(killerid,197.6661,173.8179,1003.0234) ;
    SetPlayerInterior(killerid,3);
    SetCameraBehindPlayer(killerid);
    GetPlayerPos(playerid,x,y,z);
    SetPlayerSpecialAction(killerid,SPECIAL_ACTION_HANDSUP);
    GameTextForPlayer(killerid,"~r~Jailed For Heli Kill", 10000, 0);
    SendClientMessage(killerid,COLOR_RED, "You Have Been automaticly Jailed For Helikill/HeliBlades.");
    SetTimerEx("Jailed",60*1000,0,"iiii",killerid,x,y,z);
    }
pawn Код:
forward Jailed(killerid,x,y,z);
    public Jailed(killerid,x,y,z)
    {
    SetPlayerInterior(killerid,-1);
    SetPlayerPos(killerid,x,y,z);
    SendClientMessage(killerid, -1, "Unjailed.");
    }



Re: A Little Help on jailing somthing | +rep - Mr.Faqahat - 10.01.2013

Thank you both +Rep for both of you ^^
P.S didnt tested yet but im sure it will works
Thanks alot