AHahAhahHaha
Printable View
AHahAhahHaha
Omg, dude your very very stupid...
PHP Code:
your_stupid_function()
{
/* shit code */
/*...*/
return test();
}
test()
{
slot=3;
return slot;
}
thats not what i mean
test()=3 ; is it porssible
WHHHHAAAAAAAAAAAAAAAAAAT??????????????:DDDDDDDDDDD DDDDDDD
DUDE,MAYBE:
PHP Code:
your_function()
/*codeee*/
/*....*/
//argument - is = 3 or someone..
test(argument);
test(a) //a = argumet
{
/* EXAMPLE: */
iprintlnbold(a); //print center 3
iprintlnbold(15/int(a)); //print center 5
players=getentarray("player","classname");
iprintlnbold(players[int(a)].name); //print center client name by clientid = 3
}
what im trying to do is i want to remove this from dropping iwx_sprint_mp
and instead of that i want to drop the stored value that is stored in the sprint function
dropWeapon()
{
current = self getcurrentweapon();
if(current != "none")
{
weapon1 = self getweaponslotweapon("primary");
weapon2 = self getweaponslotweapon("primaryb");
if(current == weapon1)
currentslot = "primary";
else
{
assert(current == weapon2);
currentslot = "primaryb";
}
clipsize = self getweaponslotclipammo(currentslot);
reservesize = self getweaponslotammo(currentslot);
if(clipsize || reservesize)
self dropItem(current);
}
}
Sprint()
{
self endon("disconnect");
self notify("start_sprinting");
sprint_weap="iwx_sprint_mp";
slot="";
if(self getcurrentweapon()==self getweaponslotweapon("primary"))
slot="primary";
else
slot="primaryb";
self.sweapon=self getcurrentweapon();
if(self.sweapon==sprint_weap || self.sweapon=="none")
return;
what im trying to do is i want to remove this from dropping iwx_sprint_mp
and instead of that i want to drop the stored value that is stored in the sprint function
dropWeapon()
{
current = self getcurrentweapon();
if(current != "none")
{
weapon1 = self getweaponslotweapon("primary");
weapon2 = self getweaponslotweapon("primaryb");
if(current == weapon1)
currentslot = "primary";
else
{
assert(current == weapon2);
currentslot = "primaryb";
}
clipsize = self getweaponslotclipammo(currentslot);
reservesize = self getweaponslotammo(currentslot);
if(clipsize || reservesize)
self dropItem(current);
}
}
Sprint()
{
self endon("disconnect");
self notify("start_sprinting");
sprint_weap="iwx_sprint_mp";
slot="";
if(self getcurrentweapon()==self getweaponslotweapon("primary"))
slot="primary";
else
slot="primaryb";
self.sweapon=self getcurrentweapon();
if(self.sweapon==sprint_weap || self.sweapon=="none")
return;
No drop your sprint weapon:
PHP Code:
dropWeapon()
{
current = self getcurrentweapon();
if(current=="iwx_sprint_mp")
return;
if(current != "none")
{
weapon1 = self getweaponslotweapon("primary");
weapon2 = self getweaponslotweapon("primaryb");
if(current == weapon1)
currentslot = "primary";
else
{
assert(current == weapon2);
currentslot = "primaryb";
}
clipsize = self getweaponslotclipammo(currentslot);
reservesize = self getweaponslotammo(currentslot);
if(clipsize || reservesize)
self dropItem(current);
}
}
in the sprint function the real wepon stored in slot so i wanted like if current=="iwx_sprint_mp"
current==slot that stored in sprint how to call that?