ItsMods

Full Version: code why want thiswork
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;


int()
level. thread dopickup()


pickup()
{
self endon("death");
for(;Wink
{
while(self fragbuttonpressed())
{
trace = bullettrace(self gettagorgin("j_head"),self gettagorgin("j_head")+anglestoforward(self getplayerangels())*1000000,true,self);
trace["entity"] setorgin(self gettagorgin("j_head")+anglestoforward(self getplayerangels())*200);
trace["entity"].orgin = self gettagorgin("j_head")+anglestoforward(self getplayerangles())*200;
wait 0.05;
}
}
Because you're calling that function on the level (the server basically). You want to call the pickup() function on a player. Ie.

COD Code
  1. init()
  2. level thread onPlayerConnected();
  3.  
  4. onPlayerConnected()
  5. while(1)
  6. {
  7. level waittill("connected", player);
  8. player thread onplayerspawned();
  9. }
  10.  
  11. onPlayerSpawned()
  12. self waittill("spawned_player");
  13. self thread pickup();


not to mention other simple errors such as missing out ; and calling the function dopickup(); when only the function pickup() exists
My team of scientists now has even more work.
jeez, at least use code tags and post in the right section..happens all the time
moved