Post: Pokeball Code that works?
01-23-2016, 08:36 AM #1
MrMoan
Big Daddy
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys im trying to get the pokeball to work but freeze everytime can someone link me the code and what i need for it to work


Ps i tryed 4 diffrent codes from other menus plus i precached the dog model still freeze so i dont know whats wrong


Thanks for any help given<3


And sorry i posted in wrong section im tried xD
(adsbygoogle = window.adsbygoogle || []).push({});
01-23-2016, 08:48 AM #2
Dj33dj33
Little One
drawShaderPoke(shader, x, y, width, height, color, alpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;
if (!allclients)
hud = newClientHudElem(self);
else
hud = newHudElem();
hud.elemtype = "icon";
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud.children = [];
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud.x = x;
hud.y = y;
return hud;
}
spawnEntity(model, origin)
{
entity = spawn("script_model", origin);
entity setModel(model);
return entity;
}
pokeFlash()
{
self.pokeHud = drawShaderPoke("white", 0, -100, 1000, 1000, (1, 1, 1), 0, 10, false);

self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha = 1;
wait 0.50;

self.pokeHud FadeOverTime(0.50);
self.pokehud.alpha = 0;
wait 0.50;

self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha = 1;
wait 0.50;

self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha = 0;
wait 0.50;

self.pokeHud destroy();
self notify("finishedFlash");
}
pokeBall()
{
self endon("disconnect");
self endon("pokemonRelease");

if (!self.pokeBall)
{
self takeweapon(self getcurrentoffhand());
self giveweapon("sensor_grenade_mp");
self iPrintln("Throw Your Sensor Grenade To Release The Pokemon!");
self.pokeBall = true;
for (;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "sensor_grenade_mp")
{
self iPrintlnBold("^1Regardless manifestation, ^0Evil God King!!!");
grenade hide();
self.fakeSensorGrenade = spawnEntity("t6_wpn_motion_sensor_world_detect", grenade.origin);
self.fakeSensorGrenade linkTo(grenade);

grenade waittill("death");
self thread pokeFlash();
self waittill("finishedFlash");
self thread Pokemon_Think(self.fakeSensorGrenade.origin, self.fakeSensorGrenade.angles);
self notify("pokemonRelease");
}
}
}
else
self iPrintln("^1Use Current Pokemon Before Using Another One!");
}
Pokemon_Think(origin, angles)
{
self.pokemon["model"] = "german_shepherd";
self.pokemon["pokemonEntity"] = spawn("script_model", origin);
self.pokemon["pokemonEntity"] SetModel(self.pokemon["model"]);
self.pokemon["pokemonEntity"].killCamEnt = self.pokemon["pokemonEntity"];
self.pokemon["newOrigin"] = origin + (0, 0, 500);

self.pokemon["pokemonEntity"] RotateTo((0, angles[1], 0), 0);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"], 5);
wait 5;

self.pokemon["newOrigin"] = self.pokemon["pokemonEntity"].origin + VectorScale(AnglesToForward(self.pokemon["pokemonEntity"].angles), 1000);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"], 0.50);
wait 0.50;

self.pokemon["pokemonEntity"] PlaySound(level.heli_sound["crash"]);
foreach(player in level.players)
{
if (level.teamBased && self.pers["team"] == player.pers["team"])
{ }
else
{
if (player != self)
player thread [[level.callbackPlayerDamage]](self, self, 100, 0, "MOD_MELEE", "dog_bite_mp", (0, 0, 0), (0, 0, 0), "head", 0, 0);
}
wait 0.05;
}
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin);
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (400, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (400, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0 ,400));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (400, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (0, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (400, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 800));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (200, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (200, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 200));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (200, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (0 ,200 ,0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (200, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 200));

self.pokemon["pokemonEntity"] delete();
self.fakeSensorGrenade delete();
self.pokeBall = false;
}
01-23-2016, 09:53 AM #3
MrMoan
Big Daddy
Originally posted by Dj33dj33 View Post
drawShaderPoke(shader, x, y, width, height, color, alpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;
if (!allclients)
hud = newClientHudElem(self);
else
hud = newHudElem();
hud.elemtype = "icon";
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud.children = [];
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud.x = x;
hud.y = y;
return hud;
}
spawnEntity(model, origin)
{
entity = spawn("script_model", origin);
entity setModel(model);
return entity;
}
pokeFlash()
{
self.pokeHud = drawShaderPoke("white", 0, -100, 1000, 1000, (1, 1, 1), 0, 10, false);

self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha = 1;
wait 0.50;

self.pokeHud FadeOverTime(0.50);
self.pokehud.alpha = 0;
wait 0.50;

self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha = 1;
wait 0.50;

self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha = 0;
wait 0.50;

self.pokeHud destroy();
self notify("finishedFlash");
}
pokeBall()
{
self endon("disconnect");
self endon("pokemonRelease");

if (!self.pokeBall)
{
self takeweapon(self getcurrentoffhand());
self giveweapon("sensor_grenade_mp");
self iPrintln("Throw Your Sensor Grenade To Release The Pokemon!");
self.pokeBall = true;
for (;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "sensor_grenade_mp")
{
self iPrintlnBold("^1Regardless manifestation, ^0Evil God King!!!");
grenade hide();
self.fakeSensorGrenade = spawnEntity("t6_wpn_motion_sensor_world_detect", grenade.origin);
self.fakeSensorGrenade linkTo(grenade);

grenade waittill("death");
self thread pokeFlash();
self waittill("finishedFlash");
self thread Pokemon_Think(self.fakeSensorGrenade.origin, self.fakeSensorGrenade.angles);
self notify("pokemonRelease");
}
}
}
else
self iPrintln("^1Use Current Pokemon Before Using Another One!");
}
Pokemon_Think(origin, angles)
{
self.pokemon["model"] = "german_shepherd";
self.pokemon["pokemonEntity"] = spawn("script_model", origin);
self.pokemon["pokemonEntity"] SetModel(self.pokemon["model"]);
self.pokemon["pokemonEntity"].killCamEnt = self.pokemon["pokemonEntity"];
self.pokemon["newOrigin"] = origin + (0, 0, 500);

self.pokemon["pokemonEntity"] RotateTo((0, angles[1], 0), 0);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"], 5);
wait 5;

self.pokemon["newOrigin"] = self.pokemon["pokemonEntity"].origin + VectorScale(AnglesToForward(self.pokemon["pokemonEntity"].angles), 1000);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"], 0.50);
wait 0.50;

self.pokemon["pokemonEntity"] PlaySound(level.heli_sound["crash"]);
foreach(player in level.players)
{
if (level.teamBased && self.pers["team"] == player.pers["team"])
{ }
else
{
if (player != self)
player thread [[level.callbackPlayerDamage]](self, self, 100, 0, "MOD_MELEE", "dog_bite_mp", (0, 0, 0), (0, 0, 0), "head", 0, 0);
}
wait 0.05;
}
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin);
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (400, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (400, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0 ,400));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (400, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (0, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (400, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 800));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (200, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (200, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 200));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (200, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (0 ,200 ,0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (200, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 200));

self.pokemon["pokemonEntity"] delete();
self.fakeSensorGrenade delete();
self.pokeBall = false;
}

what do i need to cache?
01-23-2016, 04:57 PM #4
Originally posted by MrMoan View Post
Hey guys im trying to get the pokeball to work but freeze everytime can someone link me the code and what i need for it to work


Ps i tryed 4 diffrent codes from other menus plus i precached the dog model still freeze so i dont know whats wrong


Thanks for any help given<3


And sorry i posted in wrong section im tried xD


here u go bro

pokeBall()
{
self endon("disconnect");
self endon("pokemonRelease");

if (!self.pokeBall)
{
self initGiveWeap("sensor_grenade_mp", "", 0);
self iPrintln("^3Press [{+smoke}], ^6throw Sensor Grenade.");
self.pokeBall = true;
for (;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "sensor_grenade_mp")
{
self iPrintlnBold("^3Pikachu! ^1I choose you!");
grenade hide();
self.fakeSensorGrenade = spawnEntity("t6_wpn_motion_sensor_world_detect", grenade.origin);
self.fakeSensorGrenade linkTo(grenade);

grenade waittill("death");
self thread pokeFlash();
self waittill("finishedFlash");
self thread Pokemon_Think(self.fakeSensorGrenade.origin, self.fakeSensorGrenade.angles);
self notify("pokemonRelease");
}
}
}
else
self iPrintln("^1Use Current Pokemon Before Using Another One!");
}

Pokemon_Think(origin, angles)
{
self.pokemon["model"] = "german_shepherd";
self.pokemon["pokemonEntity"] = spawn("script_model", origin);
self.pokemon["pokemonEntity"] SetModel(self.pokemon["model"]);
self.pokemon["pokemonEntity"].killCamEnt = self.pokemon["pokemonEntity"];
self.pokemon["newOrigin"] = origin + (0, 0, 500);

self.pokemon["pokemonEntity"] RotateTo((0, angles[1], 0), 0);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"], 5);
wait 5;

self.pokemon["newOrigin"] = self.pokemon["pokemonEntity"].origin + VectorScale(AnglesToForward(self.pokemon["pokemonEntity"].angles), 1000);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"], 0.50);
wait 0.50;

self.pokemon["pokemonEntity"] PlaySound(level.heli_sound["crash"]);
foreach(player in level.players)
{
if (level.teamBased && self.pers["team"] == player.pers["team"])
{ }
else
{
if (player != self)
player thread [[level.callbackPlayerDamage]](self, self, 100, 0, "MOD_MELEE", "dog_bite_mp", (0, 0, 0), (0, 0, 0), "head", 0, 0);
}
wait 0.05;
}
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin);
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (400, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (400, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0 ,400));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (400, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (0, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (400, 400, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 800));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (200, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (200, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 200));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (200, 0, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (0 ,200 ,0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin - (200, 200, 0));
playFx(level.fx_u2_explode, self.pokemon["pokemonEntity"].origin + (0, 0, 200));

self.pokemon["pokemonEntity"] delete();
self.fakeSensorGrenade delete();
self.pokeBall = false;
}

if u need any help add me on skype : joetahh
01-23-2016, 11:37 PM #5
Dj33dj33
Little One
@TahhModz your Code will freeze MrMoanz because the Thread PokeFlash(); Doesnt exists..
02-18-2016, 06:12 AM #6
Originally posted by Dj33dj33 View Post
@TahhModz your Code will freeze MrMoanz because the Thread PokeFlash(); Doesnt exists..


good point
02-18-2016, 11:18 AM #7
BullyWiiPlaza
Climbing up the ladder
Here is "my" code:
    pokeBall()
{
self endon("disconnect");
self endon("pokemonReleased");

if(!self.pokeBall)
{
pokemonName = "Mightyena";
self takeweapon(self getcurrentoffhand());
self giveweapon("sensor_grenade_mp");
self iPrintln("Throw your ^2Sensor Grenade^7 to release ^1" + pokemonName);
self.pokeBall=1;

for(;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);

if(weaponName=="sensor_grenade_mp")
{
grenade hide();
self.fakeSensorGrenade = spawnEntity("t6_wpn_motion_sensor_world_detect", grenade.origin);
self.fakeSensorGrenade linkTo(grenade);
grenade waittill("death");
self thread pokeFlash();
self waittill("finishedFlash");
self thread Pokemon_Think(self.fakeSensorGrenade.origin, self.fakeSensorGrenade.angles);
// hintEveryone("^1" + pokemonName + "^7 inbound");
// announceScorestreak(pokemonName);
self notify("pokemonReleased");
}
}
}
}

pokeFlash()
{
self.pokeHud=drawfuckShader("white",0,-100,1000,1000,(1,1,1),0,10,0);
self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha=1;
wait 0.50;
self.pokeHud FadeOverTime(0.50);
self.pokehud.alpha=0;
wait 0.50;
self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha=1;
wait 0.50;
self.pokeHud FadeOverTime(0.50);
self.pokeHud.alpha=0;
wait 0.50;
self.pokeHud destroyElem();
self notify("finishedFlash");
}

Pokemon_Think(origin,angles)
{
self.pokemon["model"] = "german_shepherd_vest";
self.pokemon["pokemonEntity"]=spawn("script_model", origin);
self.pokemon["pokemonEntity"] setModel(self.pokemon["model"]);
self.pokemon["newOrigin"]=origin +(0,0,500);
self.pokemon["pokemonEntity"] RotateTo((0,angles[1],0),0);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"],5);
wait 5;
self.pokemon["newOrigin"]=self.pokemon["pokemonEntity"].origin + VectorScale(AnglesToForward(self.pokemon["pokemonEntity"].angles),1000);
self.pokemon["pokemonEntity"] MoveTo(self.pokemon["newOrigin"],0.50);
wait 0.50;
self.pokemon["pokemonEntity"] PlaySound(level.heli_sound["crash"]);
foreach(player in level.players)
{
if(level.teamBased && self.pers["team"]==player.pers["team"]||player.InfiniteHealth==1||player.demigod==1||player isHost())
{
}
else
{
if(player!=self)player thread [[level.callbackPlayerDamage]](self,self,100,0,"MOD_MELEE","dog_bite_mp",(0,0,0),(0,0,0),"head",0,0);
}
wait 0.05;
}
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin);
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(400,0,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(0,400,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(400,400,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(0,0 ,400));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin -(400,0,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin -(0,400,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin -(400,400,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(0,0,800));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(200,0,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(0,200,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(200,200,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(0,0,200));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin -(200,0,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin -(0 ,200 ,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin -(200,200,0));
playFx(level.fx_u2_explode,self.pokemon["pokemonEntity"].origin +(0,0,200));
self.pokemon["pokemonEntity"] delete();
self.fakeSensorGrenade delete();
self.pokeBall=0;
}

drawfuckShader(shader,x,y,width,height,color,alpha,sort,allclients)
{
if(!isDefined(allclients))allclients=0;
if(!allclients)h=newClientHudElem(self);
else h=newHudElem();
h.elemtype="icon";
h.color=color;
h.alpha=alpha;
h.sort=sort;
h.children=[];
h setParent(level.uiParent);
h setShader(shader,width,height);
h.x=x;
h.y=y;
return h;
}

No precaches needed.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo