![]() |
|
no weapon on spawn - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: no weapon on spawn (/Thread-no-weapon-on-spawn.html) Pages:
1
2
|
no weapon on spawn - Cyborgking - 08-06-2011 My mod sometimes give players no weapons at spawn and they are invisible as well. They can knife though. I think notify("spawned_player") isn't send either because nothing from what is in onplayerspawned in _rank.gsc happens. So what are the reasons for which this could happen and how do you fix it? no weapon on spawn - Lemon - 08-06-2011 Use a new/unmodified _rank.gsc. RE: no weapon on spawn - Cyborgking - 08-06-2011 (08-06-2011, 16:50)Lemon Wrote: Use a new/unmodified _rank.gsc.So the old unmodified _rank.gsc had the bug in it? RE: no weapon on spawn - koil - 08-06-2011 this is probably happening because you have wait commands in ur actual on spawned thread, you need to make new threads to have wait commands in them.. so if it looks like Code: onPlayerSpawned()
{
self setclientdvar("whoami", "^2Caster:^7 " + self.name + "");
self setclientDvar( "scr_disable_cac", 1 );
self setclientdvar("shoutlol", "1" );
self thread waitnosd();
self endon( "disconnect" );
while( true )
{
self waittill( "spawned_player" );
self setclientDvar( "scr_disable_cac", 0 );
self setclientdvar("shoutlol", "0" );
//here is the problem
wait 15;
//here is the problem
self.pers["mod_menuallow"] = true;change to this Code: onPlayerSpawned()
{
self setclientdvar("whoami", "^2Caster:^7 " + self.name + "");
self setclientDvar( "scr_disable_cac", 1 );
self setclientdvar("shoutlol", "1" );
self thread waitnosd();
self endon( "disconnect" );
while( true )
{
self waittill( "spawned_player" );
self setclientDvar( "scr_disable_cac", 0 );
self setclientdvar("shoutlol", "0" );
///change to something like this
self thread timedthread1();Code: timedthread1()
{
//here is the OLD problem
wait 15;
//here is the OLD problem
self.pers["mod_menuallow"] = true;
}and that should fix it RE: no weapon on spawn - Tomsen1410 - 08-06-2011 jep. always use functions at on palyer spawned. RE: no weapon on spawn - Cyborgking - 08-07-2011 Thanks I'll try it out.
RE: no weapon on spawn - Cyborgking - 08-07-2011 I think the issue was not because of the wait things(though it's nice to know) but because players spawned when they haven't selected a class yet. To fix it put: Code: if (maps\mp\gametypes\_globallogic_utils::isValidClass( self.class ))RE: no weapon on spawn - Tomsen1410 - 08-07-2011 When players havent choosen a class they'll get the default weapons. So M16, ASP,... RE: no weapon on spawn - koil - 08-07-2011 ^ that... its definitely timers.. unless you have modified CAC RE: no weapon on spawn - Nekochan - 08-07-2011 _class::giveLoadout(item); is modifed? |