hello everybody
someone here has a noclip/unclip script which can be publish?
i would like to do in rcon command or b3 command (/rcon unclip id) instead of activate cheat and do /noclip in console.
ORDI
xfire: ordi37zk
hello everybody
someone here has a noclip/unclip script which can be publish?
i would like to do in rcon command or b3 command (/rcon unclip id) instead of activate cheat and do /noclip in console.
ORDI
xfire: ordi37zk
yes but every players can do that. i would like to do when i want (those who have the rcon). or put that in b3 command
Spawn script_model in front of the player where he is looking. Link to. Shift or F to let him move towards the script_model.
ORDI (23rd February 2015)
i made this script:
when i press f to stop, i am stuckPHP Code:
unclip()
{
self endon("disconnect");
self endon("killed_player");
self endon("spawned_player");
self endon("spawned");
self endon("stop_noclip");
self.obj = spawn("script_origin",self.origin, 1);
self.obj.angles = self.angles;
self linkto(self.obj);
self disableweapon();
self iprintlnbold("^7Press ^3[^7MELEE^3]^7 to move!");
wait 0.1;
self iprintlnbold("^7Press ^3[^7F^3]^7 to stop!");
for(;;)
{
if(self meleebuttonpressed())
{
thing1 = anglestoforward(self getplayerangles());
thing2 = maps\mp\_utility::vectorScale( thing1, 11 );
position = self.origin + thing2;
self.obj.origin = position;
}
else if(self usebuttonPressed())
{
self notify("stop_noclip");
self unlink();
self enableweapon();
self.obj delete();
}
wait 0.01;
}
}
someone can help me?
There was technically not much wrong with your code - it was just a question of timing - if a player is linked to any object, allow at least 1 server frame before you delete the object.Code:unclip() { self endon("disconnect"); self endon("killed_player"); self.obj = spawn("script_origin",self.origin, 1); self.obj.angles = self.angles; self linkto(self.obj); self disableweapon(); self iprintlnbold("^7Press ^3[^7MELEE^3]^7 to move!"); wait 0.1; self iprintlnbold("^7Press ^3[^7F^3]^7 to stop!"); for( ;; ) { if( self meleebuttonpressed() ) { thing1 = anglestoforward( self getplayerangles() ); thing2 = maps\mp\_utility::vectorScale( thing1, 11 ); position = self.origin + thing2; self.obj.origin = position; } else if( self usebuttonPressed() ) { self notify("stop_noclip"); self unlink(); wait( 0.05 ); if( isDefined( self.obj ) ) self.obj delete(); self enableweapon(); } wait( 0.05 ); } }
FYI - if you end a wait time with "killed_player", there is no point putting further notifications like "spawned" or "spawned_player" because the loop is already ended when you die. Every single time you use endon() it adds to the total amount of script variables you use, and if you use too many, your server will crash.
ORDI (23rd February 2015)
Thank you tally
i added something in the script because if you press the melee button after f button after melee button, it crash.
PHP Code:
unclip()
{
self endon("disconnect");
self endon("killed_player");
self.obj = spawn("script_origin",self.origin, 1);
self.obj.angles = self.angles;
self linkto(self.obj);
self disableweapon();
self iprintlnbold("^7Press ^3[^7MELEE^3]^7 to move!");
wait 0.1;
self iprintlnbold("^7Press ^3[^7F^3]^7 to stop!");
for( ;; )
{
if( self meleebuttonpressed() )
{
if(!isDefined(self.obj))
{
self.obj = spawn("script_origin",self.origin, 1);
self.obj.angles = self.angles;
self linkto(self.obj);
self disableweapon();
}
thing1 = anglestoforward( self getplayerangles() );
thing2 = maps\mp\_utility::vectorScale( thing1, 11 );
position = self.origin + thing2;
self.obj.origin = position;
}
else if( self usebuttonPressed() )
{
self notify("stop_noclip");
self unlink();
wait( 0.05 );
if( isDefined( self.obj ) )
self.obj delete();
self enableweapon();
}
wait( 0.05 );
}
}