14.12.2010, 23:40
Код:
#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; }
E.X.
Код:
public JailCountDown(playerid) { ReleasePlayer(playerid); return 1; } stock ReleasePlayer(playerid) { SetPlayerPos(playerid,x,y,z); return 1; }