Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check my code?
#11
Why make a new function for 3 lines? Not needed. Also you don't need to thread it, it won't matter when making a small mod but it will when making something big.
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#12
(07-11-2011, 15:52)GOVNO12 Wrote:
PHP Code:
onPlayerSpawned()
{
    
self endon("disconnect");
    
   for(;;)
    {
        
self waittill("spawned_player");
        
                            
self thread GiveMinigun();
         }
}

GiveMinigun() 
}
self TakeAllWeapons();
self GiveWeapon("minigun_mp");
self SwitchToWeapon("minigun_mp");



This is the right one.. sorry i responded too fast.

I am still getting an error:
Server script compile error
unknown function
(See console for details)
HELP!
[Image: mca.png]
Add me on steam! otterm
Reply

#13
Go into blackops/players/mods/mp_yourmod/config_mp.cfg

Open it and at the bottom add
seta developer "1"
seta debug_script "1"
at the bottom of it. Then close it, right click on it and make it `read only`.

Now try running your mod again and it will give you more specific errors.
Reply

#14
You copied the wrong part of code.

PHP Code:
onPlayerSpawned()
{
    
self endon("disconnect");
    
   for(;;)
    {
        
self waittill("spawned_player");
        
                            
self thread GiveMinigun();
         }
}

GiveMinigun() 
{
self TakeAllWeapons();
self GiveWeapon("minigun_mp");
self SwitchToWeapon("minigun_mp");


This one will work.[/php]
Reply

#15
(07-11-2011, 20:12)GOVNO12 Wrote: You copied the wrong part of code.

PHP Code:
onPlayerSpawned()
{
    
self endon("disconnect");
    
   for(;;)
    {
        
self waittill("spawned_player");
        
                            
self thread GiveMinigun();
         }
}

GiveMinigun() 
{
self TakeAllWeapons();
self GiveWeapon("minigun_mp");
self SwitchToWeapon("minigun_mp");


This one will work.[/php]
That's exactly what i copied down. Did u test the code yourself?
[Image: mca.png]
Add me on steam! otterm
Reply

#16
(07-11-2011, 20:12)GOVNO12 Wrote: You copied the wrong part of code.

PHP Code:
onPlayerSpawned()
{
    
self endon("disconnect");
    
   for(;;)
    {
        
self waittill("spawned_player");
        
                            
self thread GiveMinigun();
         }
}

GiveMinigun() 
{
self TakeAllWeapons();
self GiveWeapon("minigun_mp");
self SwitchToWeapon("minigun_mp");


This one will work.[/php]

Is this the only code i need for my mod? Because I checked other (Quite simple) Mods and they have a lot more code, such as giving XP and such. Do I really need all that stuff?
[Image: mca.png]
Add me on steam! otterm
Reply

#17
you can't give XP in blops
[Image: lQDUjba.jpg]
Reply

#18
(07-11-2011, 22:37)OrangePL Wrote: you can't give XP in blops

so i only need to copy that and put it in my _rank.gsc file right? But I am still getting errors. I am using Notepad ++. Does anyone know if you can check for errors in that?
[Image: mca.png]
Add me on steam! otterm
Reply

#19
copy the function giveminigun(), and call it at onplayerspawned exactly as in the code
[Image: lQDUjba.jpg]
Reply

#20
(07-11-2011, 22:42)OrangePL Wrote: copy the function giveminigun(), and call it at onplayerspawned exactly as in the code

So I replace GiveMinigun with onPlayerSpawned? Sorry if I sound like a n00b.
[Image: mca.png]
Add me on steam! otterm
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Code color crosshairs koren30 3 4,015 10-02-2013, 19:26
Last Post: koren30
  Help need help?how to make plugins code hXnarutoXone 12 8,542 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 3,311 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 4,130 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 9,676 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 5,635 07-28-2013, 01:52
Last Post: First_Semyon
  Code of vector Bloodfocus 1 2,408 06-23-2013, 11:54
Last Post: Yamato
  How do you guys check for errors when scripting? akillj 6 4,339 06-15-2013, 10:48
Last Post: Yamato
  problem with gsc code CheGuevara 5 5,604 04-20-2013, 15:06
Last Post: Nekochan
  Do you play runescape? :D check this out xD [BTK]Foxy 1 3,025 04-05-2013, 18:16
Last Post: SuperNovaAO

Forum Jump:


Users browsing this thread:
1 Guest(s)

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