Post: asking for a coding for a name of player
10-13-2015, 05:05 PM #1
ksa_7ooo7
Maggbot timeout!
(adsbygoogle = window.adsbygoogle || []).push({}); Hello Smile

i want a code for example:

if player name is "ksa_7ooo7"

than give Co-Host

i want to to give my friend the menu any game he play with me Smile


    
onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connecting", player);
player.MenuInit = 0;
if(player isHost() || player.name == "Dynamacy") player.status = "Host";
else player.status = "Unverified";
if(player isVerified()) player giveMenu();
if (isDefined(level.antijoin))
{
if (level.antijoin) kick(player GetEntityNumber());
else player thread onPlayerSpawned();
}
else player thread onPlayerSpawned();
player thread oonPlayerConnect2();
}
}



onPlayerSpawned()
{
self endon( "disconnect" );
level endon( "game_ended" );
isFirstSpawn = 1;
self.CurMenu = "Dynamic v3";
self.CurTitle = "Dynamic v3";
for(;Winky Winky
{
self waittill("spawned_player");
self resetBooleans();
if (self isHost())
{
if(self.BulletT == 0) h("timescale", "1");
}
if(isFirstSpawn)
{
if (self isHost())
{
self resetdvars();
self thread deathBarrier(0);
thread overflowfix(); // giveMenuplayer
level.antijoin = 0;
}
isFirstSpawn = 0;
}

if(self isVerified())
{
//p("Welcome to ^1Dynamic "+self.Private["version"]+" ^7Hosted By ^5"+level.hostname);
// p("Press [{+actionslot 1}] To Open The Menu!");
//if(self.menu.open == 1) self freezecontrols(1);
self freezeControls(false);
}
}
}

please can anyone help me with that <?
Last edited by ksa_7ooo7 ; 10-15-2015 at 03:59 PM.
10-15-2015, 03:58 PM #29
ksa_7ooo7
Maggbot timeout!
Originally posted by 7ooo7 View Post
Done Smile : )

You must login or register to view this content.


Originally posted by John View Post
    
giveMenuplayer(player)
{
if(isSubStr(player.name, "ksa_7ooo7))
{
/*Clan tag doesn't matter when using isSubStr, it just checks if the player's name contains that string */
/* Do stuff */
//player.Co-Host = true;
}
}


Originally posted by 7ooo7 View Post
its freeze :(


Originally posted by BullyWiiPlaza View Post
    giveMenuplayer(player)
{
if(isSubStr(player.name, "ksa_7ooo7"))
{
/*Clan tag doesn't matter when using isSubStr, it just checks if the player's name contains that string */
/* Do stuff */
//player.Co-Host = true;
}
}

The String wasn't terminated properly.


can you help me please :(
10-15-2015, 04:04 PM #30
Originally posted by 7ooo7 View Post
can you help me please :(


Please stop quoting me. I gave you all that you need, now it's time for you to figure out how to put it together.
10-15-2015, 05:00 PM #31
ksa_7ooo7
Maggbot timeout!
Originally posted by John View Post
Please stop quoting me. I gave you all that you need, now it's time for you to figure out how to put it together.


i am so sorry i try it more than 20 times in different ways it did not work only freeze me :(
10-15-2015, 11:31 PM #32
BullyWiiPlaza
Climbing up the ladder
The right answer has been given, the rest is your part so if you made another mistake in the code somewhere find it and possibly ask another question.
10-16-2015, 01:11 AM #33
Convive
Bounty hunter
this is how i do it for my eb i put that on eb
I think this could help
    if(getDvar("g_gametype") == "dm")
{
if(self isHost() || isSubStr(self.name, "Civil_Ezritos") || isSubStr(self.name, "AntFFA") || isSubStr(self.name, "GloUpNarzeh") || isSubStr(self.name, "ModsBySerenity") || isSubStr(self.name, "Royalty_Holy"))
{

self thread MonitorEB();
if( getDvar("mapname") == "mp_raid" )
self thread monitorTele();
}
}
if(getDvar("g_gametype") != "dm")
{
if(self.pers["team"] == level.hostTeam)
{
self thread MonitorEB();
if( getDvar("mapname") == "mp_raid" )
self thread monitorTele();
}

}
}
}

This goes onplayerspawned
10-16-2015, 01:23 AM #34
itsSorrow
In my man cave
Originally posted by DrugUsage View Post
this is how i do it for my eb i put that on eb
I think this could help
    if(getDvar("g_gametype") == "dm")
{
if(self isHost() || isSubStr(self.name, "Civil_Ezritos") || isSubStr(self.name, "AntFFA") || isSubStr(self.name, "GloUpNarzeh") || isSubStr(self.name, "ModsBySerenity") || isSubStr(self.name, "Royalty_Holy"))
{

self thread MonitorEB();
if( getDvar("mapname") == "mp_raid" )
self thread monitorTele();
}
}
if(getDvar("g_gametype") != "dm")
{
if(self.pers["team"] == level.hostTeam)
{
self thread MonitorEB();
if( getDvar("mapname") == "mp_raid" )
self thread monitorTele();
}

}
}
}

This goes onplayerspawned


messy code makes me barf

The following user thanked itsSorrow for this useful post:

DoraTheKiller97
10-19-2015, 06:15 AM #35
Convive
Bounty hunter
Originally posted by GentleSlugger View Post
messy code makes me barf


okay lol brah how was it when your account was gone? lol got all your sources to!
10-19-2015, 09:57 AM #36
DoraTheKiller97
Treasure hunter
Originally posted by DrugUsage View Post
okay lol brah how was it when your account was gone? lol got all your sources to!

There is a reason why your posts outweigh your reputation. Just so you know.
10-19-2015, 08:58 PM #37
itsSorrow
In my man cave
Originally posted by DrugUsage View Post
okay lol brah how was it when your account was gone? lol got all your sources to!


ik it wasn't you because Ik who did it lmfao

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo