[HELP] Anti-Driveby == Jail
#3

Код:
#include <a_samp>
#define JAILTIME 5 //Minutes
new JCD[MAX_PLAYERS],Counter[MAX_PLAYERS];
forward JailCountDown(killerid);


public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerState(killerid) == 2)
    {
        if(!IsPlayerInAnyVehicle(playerid))
        {
            new playername[MAX_PLAYER_NAME];
            GetPlayerName(killerid, playername, sizeof(playername));
            new string[128];
            //RemovePlayerFromVehicle(killerid);
            ResetPlayerWeapons(killerid);
            SetCameraBehindPlayer(killerid);
            SetPlayerInterior(killerid,3);
            SetPlayerPos(killerid,194.0873,175.3850,1003.0234);
            SetPlayerFacingAngle(killerid,20.7011);
            format(string, sizeof(string), "%s(%d) Do NOT Driveby",playername ,killerid);
            SendClientMessageToAll(0xFF7F50AA, string);
            if(JCD[killerid]) KillTimer(JCD[killerid]);
            Counter[killerid]=seconds;
            JCD[killerid] = SetTimerEx("JailCountDown", JAILTIME*1000, false, "d", killerid);
            return 1;
        }
    }
    return 1;
}
Use that. When you do your jail countdown, Just put the code to release the player.
E.X.
Код:
public JailCountDown(playerid)
{
   ReleasePlayer(playerid);
   return 1;
}
stock ReleasePlayer(playerid)
{
  SetPlayerPos(playerid,x,y,z);
  return 1;
}
Reply


Messages In This Thread
[HELP] Anti-Driveby == Jail - by Larsey123IsMe - 14.12.2010, 22:57
Re: [HELP] Anti-Driveby == Jail - by Jefff - 14.12.2010, 23:35
Re: [HELP] Anti-Driveby == Jail - by 1337connor - 14.12.2010, 23:40
Re: [HELP] Anti-Driveby == Jail - by Larsey123IsMe - 14.12.2010, 23:55

Forum Jump:


Users browsing this thread: 1 Guest(s)