when i kick a player comes this error and his game not quitted
error line # 281
if ( status[ player.ID ].PHidden == true ) status[ player.ID ].PHidden = false;
kick function
function cKick( p )
{
if ( status[ p.ID ].PHidden == true ) status[ p.ID ].PHidden = false;
if (status[p.ID].JoinLMS == 1)
{
status[p.ID].JoinLMS = 0;
gLMS.CountLMS--;
Winner.remove( Winner.find( p.ID ) );
checklms();
}
SetPlayerSpree(p);
SaveStats( p );
KickPlayer( p );
}
kick identifiyer function
function KickPlr(identifier)
{
if (typeof identifier != "integer" && typeof identifier != "string") return;
local player = FindPlayer(identifier);
if (typeof player == "instance")
{
if (pinfo[id].Logged == true) SavePlayerData(id);
pinfo[id] = null;
KickPlayer(player);
}
}
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi59.tinypic.com%2Fj6ip8m.png&hash=a707c4092cac757b83e3d0c1d8fa7c2c50f3d32c)
Just search the forum "the index does not exist". JUST DO IT! I would like the rest of the people viewing this topic to not give a f*. Try to hold the urge of feeding him.
not finded please link
Nope. Find it yourself. It's not hard to find, it's a stickied topic.
please give me link i am not lazy to dont try to find i try but not finding
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi58.tinypic.com%2F2hok1e8.png&hash=db965e4aa0fdb5b004669ace0ea17d76dced5435)
goto the main page of VCMP forum and then search for it
And the best part, maybe you haven't loaded the playerclass or u don't have PHideen on your playerclass
So add it, else show your onPlayerJoin event
Quote from: KAKAN on Sep 17, 2015, 06:42 AMAnd the best part, maybe you haven't loaded the playerclass or u don't have PHideen on your playerclass
So add it, else show your onPlayerJoin event
class PlayerStats
{
IsReg = false;
IsLogged = false;
Kills = 0;
Deaths = 0;
Cash = 0;
Bank = 0;
statsT = false;
nogoto = false;
KillingSpree = 0;
Level = 0;
Joins = 0;
PHidden = false;
JoinLMS = 0;
Px = 0;
LastTeam = 0;
}
function onPlayerJoin( player )
{
local country = IpToCountry( player.IP );
Message( "[#ff033e][JOIN]: [#00FFFF]"+player.Name+" Has joined WORLD WARS from [#06FA16]"+country+"[#F5FFFA]." );
local IP = player.IP;
Message("*[#00cc99] " + player.Name + " is connecting the server");
draw.ShowForPlayer(player);
s<-CreateSprite("image.jpg",580,360,0,0,0,255);
s.ShowForAll ();
CreateMarker(player.UniqueWorld, Vector( -10.4317, -213.3678, 10.1507 ), 5, RGB(0, 0, 0), 101 );
CreateMarker(player.UniqueWorld, Vector( -1686.2292, -29.0471, 7.5577 ), 5, RGB(0, 0, 0), 116 );
CreateMarker(player.UniqueWorld, Vector( -436.8255, 1239.9253, 10.0365 ), 5, RGB(0, 0, 0), 117 );
MessagePlayer("[#0000ff]Your Unique ID is [#ff00ff]"+player.UniqueID,player);
MessagePlayer("[#e32636]***==========[#76ff7a]Welcome To The Server[#e32636]==========***",player);
MessagePlayer("[#ff033e][GREETINGS][#ed9121]:[#df00ff]We welcome you to [#ed9121]WORLD WARS ,[#df00ff] A world of its own",player);
MessagePlayer("[#ff033e][INFORMATION][#ed9121]:[#df00ff]Be sure to type [#ed9121]/rules, /info [#df00ff]& [#ed9121]/cmds [#df00ff]before playing " player );
MessagePlayer("[#990000]===========[#fffafa]"+ player.Name + ", IP: " + player.IP +"[#990000]=============" player );
MessagePlayer("[#fffafa]/Register [#990000]& [#fffafa]/login [#990000]before playing" player );
EchoMessage(ICOL_LBLUE +"* " + player.Name + " has joined the server.");
LastActive(player);
AccInfo( player );
}
add this on your onPlayerJoin:-
stats[ player.ID ] = PlayerClass( player.Name);
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi59.tinypic.com%2F2e6hcw8.png&hash=be07a3857595d168dae568cc0bfa89290092cb33)
Oh sry, add this
stats[ player.ID ] = PlayerStats( player.Name);
thanx you solve it but stats not works with my script i changed it to status and its work