02.11.2011, 22:10
pawn Код:
#include <a_samp>
new AntiDM[MAX_PLAYERS];
#define VERDE 0x33AA33AA
#define Vermelho 0xF60000AA
public OnPlayerUpdate(playerid){
if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN || GetPlayerWeapon(playerid) == 8 || GetPlayerWeapon(playerid) == 42 || GetPlayerWeapon(playerid) == 40 || GetPlayerWeapon(playerid) == 9 || GetPlayerWeapon(playerid) == 18 || GetPlayerWeapon(playerid) == 35 || GetPlayerWeapon(playerid) == 36 || GetPlayerWeapon(playerid) == 37 || GetPlayerWeapon(playerid) == 38 || GetPlayerWeapon(playerid) == 39 || GetPlayerWeapon(playerid) == 44 ||
GetPlayerWeapon(playerid) == 37 || GetPlayerWeapon(playerid) == 34 || GetPlayerWeapon(playerid) == 33 || GetPlayerWeapon(playerid) == 32 || GetPlayerWeapon(playerid) == 31 || GetPlayerWeapon(playerid) == 30 || GetPlayerWeapon(playerid) == 29 || GetPlayerWeapon(playerid) == 28 || GetPlayerWeapon(playerid) == 27 || GetPlayerWeapon(playerid) == 26 || GetPlayerWeapon(playerid) == 25 || GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 23 ||
GetPlayerWeapon(playerid) == 22 || GetPlayerWeapon(playerid) == 18 || GetPlayerWeapon(playerid) == 17 || GetPlayerWeapon(playerid) == 16 || GetPlayerWeapon(playerid) == 15)
{if(!IsPlayerAdmin(playerid)){
SendClientMessage(playerid, Vermelho, "(SERVER): Vocк foi preso por pegar ARMAS!");
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,197.6661,173.8179,1003.0234);
SetPlayerInterior(playerid,3);
AntiDM[playerid] = 1;
SetTimerEx("SoltarJogador", 100000, 0, "i", playerid);
}}return 1;}
forward SoltarJogador(playerid);
public SoltarJogador(playerid){
if( IsPlayerConnected(playerid) == 1) {
SetPlayerHealth(playerid,0.0);
AntiDM[playerid] = 0;
SendClientMessage(playerid,VERDE,",INFO: Vocк foi solto! Nгo pegue mais armas no servidor.");}
return 1;}
public OnPlayerText(playerid, text[]){
if(AntiDM[playerid] == 1){
SendClientMessage(playerid,Vermelho,",INFO: Vocк nгo pode falar em quanto tiver PRESO!");}
return 1;}
public OnPlayerCommandText(playerid, cmdtext[]){
if(AntiDM[playerid] == 1 && strcmp(cmdtext,"/", true) != 0) return SendClientMessage(playerid,Vermelho,"(ERRO): Vocк nгo pode digitar quando estiver PRESO!");return 0;}
Olha eu fiz este codigo... Mais nгo sei se й isto. Se o jogador pegar armas ele й preso por 10 minutos..