Post: scripting help
04-11-2015, 09:40 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Ok so i'm trying to make a script where if the map isn't Carrier, It'll change the map to Carrier.
But my problem is that when is switches to Carrier, It thinks its not Carrier and it loads it up again. Then it turns into an infinite loop.

Here's the script:

ifstatement()
{
if (map( "mp_carrier", true ) == false)
{
map( "mp_carrier", true );
}

else
{
self iprintln("mp_carrier");
}
}

Sorry if it looks like its the easiest thing to do but i'm new to gsc scripting.
(adsbygoogle = window.adsbygoogle || []).push({});
04-11-2015, 11:13 PM #2
Krypton
Climbing up the ladder
Originally posted by Rizk View Post
Ok so i'm trying to make a script where if the map isn't Carrier, It'll change the map to Carrier.
But my problem is that when is switches to Carrier, It thinks its not Carrier and it loads it up again. Then it turns into an infinite loop.

Here's the script:

ifstatement()
{
if (map( "mp_carrier", true ) == false)
{
map( "mp_carrier", true );
}

else
{
self iprintln("mp_carrier");
}
}

Sorry if it looks like its the easiest thing to do but i'm new to gsc scripting.


I would not even start a "GSC Menu". There are already way to many OF THE SAME STUFF DIFFERENT STYLE. I would just void the project. Too many gsc menu's. Start making stuff for the newer games like ghosts, advanced warfare, and etc. I just said this on the post you posted before about this scripting.
04-12-2015, 04:38 AM #3
.....
04-12-2015, 04:39 AM #4
Originally posted by Mercury. View Post
I would not even start a "GSC Menu". There are already way to many OF THE SAME STUFF DIFFERENT STYLE. I would just void the project. Too many gsc menu's. Start making stuff for the newer games like ghosts, advanced warfare, and etc. I just said this on the post you posted before about this scripting.

i was never trying to release anything. this is just for personal use.. and its not a menu. just a gsc script..

The following user thanked Tren-Rizk for this useful post:

MCabCon
04-12-2015, 05:06 AM #5
TAZBXIV
Bounty hunter
Yea and like he and I both said, hes not releasing anything. Just try to help instead of being a prick about it.

The following user thanked TAZBXIV for this useful post:

iHaxel
04-13-2015, 07:24 PM #6
iiiCenTurY
Gym leader
Maybe try this:
    
mapGetDvar()
{
if(getDvar("mapname") != "mp_carrier")
{
map( "mp_carrier", true );
}
else
{
self iprintln("Map: ^5mp_carrier");
}
}


Smile
04-13-2015, 08:51 PM #7
Originally posted by iiiCenTurY View Post
Maybe try this:
    
mapGetDvar()
{
if(getDvar("mapname") != "mp_carrier")
{
map( "mp_carrier", true );
}
else
{
self iprintln("Map: ^5mp_carrier");
}
}


Smile


Change it than it will works Smile




mapGetDvar()
{
if(getDvar("mapname") != "mp_carrier")
{
self iprintln("");
}
else
{
map( "mp_carrier", true );
}
}
}
04-13-2015, 09:23 PM #8
jwm614
NextGenUpdate Elite
Originally posted by MCabCon View Post
Change it than it will works Smile




mapGetDvar()
{
if(getDvar("mapname") != "mp_carrier")
{
self iprintln("");
}
else
{
map( "mp_carrier", true );
}
}
}



U got it wrong
the guy u quoted changed it an has it right

The following user thanked jwm614 for this useful post:

MCabCon
04-14-2015, 02:54 PM #9
Originally posted by jwm614 View Post
U got it wrong
the guy u quoted changed it an has it right


yes i saw already Winky Winky

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo