Raised This Month: $51 Target: $400
 12% 

Hey I need some help with 1. time scripting =)


Post New Thread Reply   
 
Thread Tools Display Modes
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 09-03-2010 , 17:55   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #21

This is taken from his own code:

PHP Code:
new const gSuperPlayer[] = "models/player/Soldat/PLAYER_MODEL.mdl"

cs_set_user_model(id"PLAYER_MODEL"
I don't see anything wrong with it.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 09-03-2010 , 18:01   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #22

too much lazy for write it, here is a quote

Quote:
Originally Posted by ConnorMcLeod View Post
I assume here that you know that when a model name is "blabla", you know that the only place to put it on server ftp is $moddir/models/player/blabla/, so the ful path is $moddir/models/player/blabla/blabla.mdl, because it is the only way player models work on half-life and mods.
Fr33m@n is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 09-03-2010 , 18:31   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #23

Hence why I told him to re-read my first post.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
jacker
Junior Member
Join Date: Apr 2008
Old 09-04-2010 , 03:31   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #24

Hey again, i've gotten the player model to work... but i have to add a "SoldatT" model too.... but, when another person tries to join my LAN server, and he had downloaded whatever he should, and chooces t be CT there comes an error saying that he needs the T model, why doesn't this download like the other stuff?
btw, unl. ammo and wep models ain't working

PHP Code:
/* CVARS - copy and paste to shconfig.cfg
//Soldat
Soldat_level 1
Soldat_health 1000  //Hvor meget liv du får (normal 100)
Soldat_armor 200  //Hvor meget pansring du får (normal 0)
Soldat_gravity 0.25  //Hvor højt du kan hoppe (normal 1.0)
Soldat_speed 750  //Hvor hurtigt du kan løbe (normal 400)
Soldat_mult 2.5   //Hvor mange % din skade bliver (normal 1=100%)
*/
#include<superheromod>  
// GLOBAL VARIABLES
new gHeroID
new const gHeroName[] = "Soldat" //creates a string varr to hold the hero name
new bool:gHasSuperPower[SH_MAXSLOTS+1//creates a varr with an aray, with 1 slot per player  
new const gSuperPlayer[] = "models/player/Soldat/Soldat.mdl"
new const gSuperWeapon[] = "models/shmod/Soldat_v_m4a1.mdl"
new const gSuperWeapon2[] = "models/shmod/Soldat_v_deagle.mdl"
new gWeapons[3] = 
    {
     
CSW_M4A1,
 
CSW_DEAGLE
    
}
public 
plugin_init()
{
    
//This registers the plugin with amx mod x. This is what is shown when you type amx_plugins in console
    
register_plugin("SUPERHERO Soldat""1.2""Soldateen")
    new 
pcvarLevel register_cvar("Soldat_level""0")
    new 
pcvarHealth register_cvar("Soldat_health""1000")
    new 
pcvarArmor register_cvar("Soldat_armor""200")
    new 
pcvarGrav register_cvar("Soldat_grav""0.25")
    new 
pcvarSpeed register_cvar("Soldat_speed""750")
    new 
pcvarMult register_cvar("Soldat_mult""5")
    
register_event("CurWeapon""weapon_change""be""1=1")
    
    
gHeroID sh_create_hero(gHeroNamepcvarLevel)    
    
sh_set_hero_info(gHeroID"Du er nu blevet en æret soldat""Du er nu blevet uddannet soldat, gå i krig med dine nye våben og kom hjem med ære!")
    
sh_set_hero_hpap(gHeroIDpcvarHealthpcvarArmor)
    
sh_set_hero_grav(gHeroIDpcvarGrav)
    
sh_set_hero_speed(gHeroIDpcvarSpeedgWeapons2)
    
sh_set_hero_dmgmult(gHeroIDpcvarMultCSW_M4A1)
    
sh_set_hero_dmgmult(gHeroIDpcvarMultCSW_DEAGLE)
    
    
//if you were used to the old method you will notice that there is no need to register the init anymore therefor nothing more is required
}
public 
sh_hero_init(idheroIDmode)
{
    
//if no power return
    
if (gHeroID != heroID) return
    
    
//This is what runs when someone drops or picks the hero
    
switch(mode)
    {
        
//if the hero is added
        
case SH_HERO_ADD:
        {
            
//it is true that client has the hero
            
gHasSuperPower[id] = true
     super_morph
(id)
     
super_weapon(id)
     
switch_model(id)
        }
        
//if the hero is dropped
        
case SH_HERO_DROP:
        {
            
//it is false that the client has the hero
            
gHasSuperPower[id] = false
     super_unmorph
(id)
     if (
is_user_alive(id))
            {
      
sh_drop_weapon(idCSW_M4A1true)
  
sh_drop_weapon(idCSW_DEAGLEtrue)
    }
        }
    }
}
public 
plugin_precache()
{
precache_model(gSuperPlayer)
precache_model(gSuperWeapon)
precache_model(gSuperWeapon2)
}
public 
sh_client_spawn(id)
{
 if (
gHasSuperPower[id])
    {
     
super_morph(id)
 
super_weapon(id)
    }
}
super_morph(id)
{
 
cs_set_user_model(id"Soldat")
}
super_unmorph(id)
{
 
cs_reset_user_model(id)
}  
super_weapon(id)
{
 if (
shModActive() && is_user_alive(id) && gHasSuperPower[id] )
    {
     
sh_give_weapon(idCSW_M4A1)
 
sh_give_weapon(idCSW_DEAGLE)
    }
}
public 
weapon_change(id)
{
    if ( !
sh_is_active() || !gHasSuperPower[id] ) return
    new 
weaponID read_data(2)
    
    if ( 
weaponID != CSW_M4A1 || weaponID != CSW_DEAGLE ) return
    
    
switch_model(id)
    
    if ( 
read_data(3) == )
    {
        
sh_reload_ammo(id1)
    }
}  
switch_model(id)
{
 if (!
shModActive() || !is_user_alive(id) || !gHasSuperPower[id] ) return
 if (
get_user_weapon(id) == CSW_M4A1)
 {
  
set_pev(idpev_viewmodel2gSuperWeapon)
 }
 if (
get_user_weapon(id) == CSW_DEAGLE)
 {
    
set_pev(idpev_viewmodel2gSuperWeapon2)
 }

jacker is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 09-04-2010 , 05:29   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #25

You never set a SoldatT model and you didn't precache it either.
__________________
Jelle (1): I LOVE YOU
Jelle (1): Yeah. omg you are so awesome!
--------------
Jelle (1): You know when a poo is about to exit but it is too big?
Jelle (1): God my ass still hurts
Exploited is offline
jacker
Junior Member
Join Date: Apr 2008
Old 09-04-2010 , 05:37   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #26

where and how should i set it :$
jacker is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 09-04-2010 , 08:45   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #27

cs_set_user_model(id, "SoldatT") lol..

Make a teamcheck if you want different models for different teams.cs_get_user_team
__________________
The Art of War is offline
jacker
Junior Member
Join Date: Apr 2008
Old 09-04-2010 , 10:54   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #28

hey again, idk what happened, but I got tired of the old skin and decided to switch it out, but... somehow I just went invisible I'm using this skin : http://www.fpsbanana.com/skincats/3282

well, no ideas about unlimited ammo and the weapon models ?
jacker is offline
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 09-04-2010 , 11:05   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #29

Quote:
Originally Posted by jacker View Post
where and how should i set it :$
you don't, just precache it
PHP Code:
precache_generic("models/player/Soldat/SoldatT.mdl"
alternatively there is a way to combine 2 file models like that, but I forgot how so you'd have to look it up on your own.


as for weapon model/unlimited ammo
PHP Code:
if ( weaponID != CSW_M4A1 || weaponID != CSW_DEAGLE ) return 
think about that for a moment, your saying if the weapon is not a m4 OR it's not a desert eagle to stop. Since a weapon can't be both a m4 and deagle at the same time even if you have a m4 out it'll still stop there, because of the deagle check. Using && instead of || will do exactly what you meant though.
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 09-04-2010 , 22:09   Re: Hey I need some help with 1. time scripting =)
Reply With Quote #30

Quote:
Originally Posted by G-Dog View Post
as for weapon model/unlimited ammo
PHP Code:
if ( weaponID != CSW_M4A1 || weaponID != CSW_DEAGLE ) return 
think about that for a moment, your saying if the weapon is not a m4 OR it's not a desert eagle to stop. Since a weapon can't be both a m4 and deagle at the same time even if you have a m4 out it'll still stop there, because of the deagle check. Using && instead of || will do exactly what you meant though.
This I don't quite get.

It checks if the gun is not a m4 or a deagle, if it is neither of those, stop. If he does "&&", it would say if weapons is not m4 or deagle, stop. As I see it, it doesn't really matter which one those you use.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode