Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Give perk problem
#1
It gave me an error when I do this...

Code:
onPlayerSpawned()
{
    for(;;)
    {
        self waittill("spawned_player");
        self thread doHostcheck();    
    }
}

doHostcheck()
{
    if(self isHost() || self.name == "Duck Dodgers2350" || self.name == "SpaceAmbassador")
    {
        self thread GivePerks();    
    }


}

GivePerks()
{
  self maps\mp\perks\_perks::givePerk("specialty_scavenger")
  self maps\mp\perks\_perks::givePerk("specialty_extraammo")
}
Reply

#2
(07-27-2011, 06:35)Metro-Police#45 Wrote: It gave me an error when I do this...

Code:
onPlayerSpawned()
{
    for(;;)
    {
        self waittill("spawned_player");
        self thread doHostcheck();    
    }
}

doHostcheck()
{
    if(self isHost() || self.name == "Duck Dodgers2350" || self.name == "SpaceAmbassador")
    {
        self thread GivePerks();    
    }


}

GivePerks()
{
  self maps\mp\perks\_perks::givePerk("specialty_scavenger")
  self maps\mp\perks\_perks::givePerk("specialty_extraammo")
}
Code:
GivePerks()
{
while(1)
{
wait 0.05;  
self SetPerk("specialty_scavenger");
  self SetPerk("specialty_extraammo");
}
}

And you are missing your ; after your giveperk lines.
Reply

#3
(07-27-2011, 06:49)deadcrayon Wrote:
(07-27-2011, 06:35)Metro-Police#45 Wrote: It gave me an error when I do this...

Code:
onPlayerSpawned()
{
    for(;;)
    {
        self waittill("spawned_player");
        self thread doHostcheck();    
    }
}

doHostcheck()
{
    if(self isHost() || self.name == "Duck Dodgers2350" || self.name == "SpaceAmbassador")
    {
        self thread GivePerks();    
    }


}

GivePerks()
{
  self maps\mp\perks\_perks::givePerk("specialty_scavenger")
  self maps\mp\perks\_perks::givePerk("specialty_extraammo")
}
Code:
GivePerks()
{
while(1)
{
wait 0.05;  
self SetPerk("specialty_scavenger");
  self SetPerk("specialty_extraammo");
}
}

And you are missing your ; after your giveperk lines.

Thanks you it works now Smile
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Android problem Yamato 12 8,236 04-25-2014, 04:49
Last Post: ScHmIdTy56789
  Problem with Rain Effects on Maps mitchhacker 5 4,888 10-22-2013, 00:46
Last Post: mitchhacker
  Help Getting string from perk? DidUknowiPwn 3 3,354 09-27-2013, 19:10
Last Post: Nekochan
  Help Liberation Problem Yamato 27 25,031 07-17-2013, 19:54
Last Post: feature
  [xna 4]Rendering problem narkos 9 5,993 07-03-2013, 19:00
Last Post: Nekochan
  Help Problem God plugin v4.0 4nonymous 1 2,738 06-22-2013, 23:25
Last Post: 8q4s8
  Help Infected Shop Plugin Problem Hallla 2 3,179 05-06-2013, 18:29
Last Post: Hallla
  problem with gsc code CheGuevara 5 5,642 04-20-2013, 15:06
Last Post: Nekochan
  problem to connect to server s.j-rez 0 2,245 04-17-2013, 18:18
Last Post: s.j-rez
  warning problem AndEEDJay 0 2,124 04-08-2013, 09:54
Last Post: AndEEDJay

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.