CMD:ta(playerid, params[]) { if(IsACop(playerid)) { new string[128]; if(pTazer[playerid] == 0) { pTazerReplace[playerid] = Info[playerid][pWeapons][2]; if(Info[playerid][pWeapons][2] != 0) RemovePlayerWeapon(playerid, Info[playerid][pWeapons][2]); format(string, sizeof(string), "* %s carga su tazer.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); GivePlayerValidWeapon(playerid, 23); pTazer[playerid] = 1; } else { RemovePlayerWeapon(playerid, 23); GivePlayerValidWeapon(playerid, pTazerReplace[playerid]); format(string, sizeof(string), "* %s apaga y guarda su tazer.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); pTazer[playerid] = 0; } } |
function TazerTimer(playerid) { if (TazerTimeout[playerid] > 0) { new string[128]; format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~r~Recargando Tazer... ~w~%d", TazerTimeout[playerid]); GameTextForPlayer(playerid, string,1500, 3); TazerTimeout[playerid] -= 1; SetTimerEx("TazerTimer",1000,false,"d",playerid); } return 1; } |
new WeaponNames[47][] = // As below { "puсo","brass knuckles","golf club","nitestick","knife","baseball bat","shovel","palo de billar","katana","chainsaw","purple dildo","small white vibrator","large white vibrator","silver vibrator", "bouquet of flowers","cane","grenade","tear gas grenade","molotov cocktail","jetpack"," "," ","Colt .45","silenced Colt .45","Desert Eagle","12-gauge shotgun","sawn-off shotgun","SPAS-12", "Micro Uzi","MP5","AK-47","M4A1","TEC-9","rifle","sniper rifle","rocket launcher","heatseeker","flamethrower","minigun","s atchel charge","detonator","spray can","fire extinguisher", "camera","nightvision goggles", "thermal goggles","parachute" }; new HasArmor [MAX_PLAYERS]; new Float:ScriptArmor [MAX_PLAYERS]; function SetHP(playerid, Float:hp) { Info[playerid][pHealth] =hp; SetPlayerHealth(playerid, hp); return 1; } function GiveArmorToPlayer(playerid, Float:armour) { SetPlayerArmour(playerid, Float:armour); HasArmor[playerid] = 1; ScriptArmor[playerid] = armour; return 1; } timer Anticheat[1000]() { foreach(Player, i) { if(IsPlayerConnected(i)){ new Float:health, Float:armor; GetPlayerHealth(i, health); if(health > Info[i][pHealth]){ SetPlayerHealth(i, Info[i][pHealth]); } GetPlayerArmour(i, armor); if(armor > ScriptArmor[i]){ GiveArmorToPlayer(i, ScriptArmor[i]); } } } return 1; } |
/*
CREDITOS: OTACON
*/
#define SACAR_TAZER (5000)
new AmmoTazer[MAX_PLAYERS];
new bool:ActivarTazer[MAX_PLAYERS]=false;
new bool:PlayerTazeado[MAX_PLAYERS]=false;
new TerminarTazeado[MAX_PLAYERS];
CMD:ta(playerid, params[])
{
new string[128];
AmmoTazer[playerid] = GetPlayerAmmo(playerid);
switch(GetPlayerWeapon(playerid)) {
case 22: { //9mm
GivePlayerWeapon(playerid, 23, AmmoTazer[playerid]);
AmmoTazer[playerid] = true;
format(string, sizeof(string), "* %s carga su tazer.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
case 23: { //Silenced 9mm
GivePlayerWeapon(playerid, 22, AmmoTazer[playerid]);
AmmoTazer[playerid] = false;
format(string, sizeof(string), "* %s apaga su tazer.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID) {
if(AmmoTazer[issuerid] == true && GetPlayerWeapon(issuerid) == 23 && PlayerTazeado[playerid] == false) {
TogglePlayerControllable(playerid, false);
PlayerTazeado[playerid] = true;
TerminarTazeado[playerid]=SetTimerEx("TocarTazer", SACAR_TAZER, false, "i", playerid);
new string[128];
format(string, sizeof(string), "Tazeado %i Milisegundos.", SACAR_TAZER);
GameTextForPlayer(playerid, string, 3000, 1);
}
}
return 1;
}
forward TocarTazer(playerid);
public TocarTazer(playerid) {
TogglePlayerControllable(playerid, true);
PlayerTazeado[playerid] = false;
GameTextForPlayer(playerid, "Tazer Quitado.", 3000, 1);
KillTimer(TerminarTazeado[playerid]);
return 1;
}
/*
CREDITOS: OTACON
*/
bytytus lo que me diste me compilo pero al poner /ta no hace nada porfavor ayuda
|
xDD. eso es razon de tu anti cheats, tienes Prohibida la Silenced 9mm en tu server.
configura el anticheat. |