Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Fjose

#46
Quote from: S.L.C on Dec 11, 2014, 04:20 PMWhen the player disconnects:
my_array[index] = null;
When the player connects:
my_array[index] = my_class();
Now you signal that you wan't to use that slot/index/element of the array again. Keeping your array size constant and reducing overhead or resizing the array.

I was talking about the "players" table not about an array. about your examples everybody must know it lol (if is using an array), I have that in my functions but the question is, what will happen with the player when this is kicked? if you are saying that the players table must be removed from kickplr?

then I'll be only cleaning the data when players leaves but not when are kicked? I guess it you are confused or forgetting something

Quote from: S.L.C on Dec 11, 2014, 04:20 PMWhat do you think will be the output of that program? Do you think it will be 33? WRONG! the output will be 01, because you had no idea in the function body that you overloaded the global one. You think you know but it's easy to make mistakes. Not only that you have a more descriptive code but you're also protecting you're self from such mistakes.

I know it

Quote from: S.L.C on Dec 11, 2014, 04:20 PM
Quote from: Fjose on Dec 11, 2014, 04:03 PMof where was taken out the "instance"?

Even though you use OOP you still don't have the slightest idea of what an instance is. I might write a short guide about classes and OOP some day but you really need to document a little about the concept.

just explain me now '-'
my skills are limited, what I learned, was reading the scripts created by others lol
#47
I was eaten alive lol
1) I understood, collectgarbage is useless
2) "g" "_" for global variables, totally useless when I already know what are the global variables
3) KickPlr was only identifying the player.ID, I'll update it, ok hh.
4) then, what do you think it is the best idea if a player leaves or is kicked with the players table.. if I don't clean the data then this will continue summing until collapse?  is supposed that I need clean the data if a new player joins
5) of where was taken out the "instance"?
#48
Kicking player and nothing happens, incredibly this code was working perfectly on 0.3z version

function KickPlr( id )
{
local player = FindPlayer( id );
if ( player )
{
if ( pinfo[id].Logged == true ) SavePlayerData( id );
pinfo[id] = null;
local blah = collectgarbage();
print( blah );
players.rawdelete(id );
KickPlayer( player );
}
}



#49
Dev/Mod(s) have something to say?
#50
Sorry guys,  I forgot a detail.. I was talking about is visible on radar for only players with same skin

Edited.
#51
I was seeing some functions but I can't find a function for hide players only with a different skin. player can see others with same skin but not with a different skin, that's my idea.

#52
I have not more option to wait for that function :/

Topic Locked. Definitely
#53
Quote from: Honey on Nov 26, 2014, 11:34 AMIt's Vehicle.RelativeSpeed

and why you said player.RelativeSpeed '-'
two examples with player.RelativeSpeed and one with player.Vehicle.RelativeSpeed.

anyway I want the speed only for the player, no for player inside vehicle, maybe this function was not added :/ because the only one is player.AddSpeed but this callback doesn't exists
#54
Solved, thanks
#55
sorry for bump my own topic, today I've tested honey suggestions and I got an error..

"Member Variable not found"

1) player.RelativeSpeed = 0;

2) player.RelativeSpeed / 0.5;

maybe not exists these functions :(
#56
the problem is simple.
I have created a sprite and this is loaded in onScriptLoad(), when I use "any_sprite.ShowForPlayer( player )" in onPlayerDeath works fine, when player dies, this will be auto respawned but the server shows an error in the line.

any_sprite.HideForPlayer( player ). the error in the console is: "player" variable doesn't exists but exists...

#57
Simply I was testing this code
function onTimeChange( hr, min)
{
     print( "Server Time: " + hr + ":" + min );
}

and I'm receiving this message: AN ERROR HAS OCURRED [Wrong numbers of parameters]
CALLSTACK
LOCALS
#58
there is no something what you cannot do? ;D
good job
#59
thanks is working good :)
#60

local prefix = "", col = GetTeamRGB( player.Team );
if ( p.Admin == 3 ) prefix = "[#49B3DE][Moderator] [#FFF]";
ClientMessageToAll( prefix + player.Name + ": [#FFFFFF]" + text, col.r, col.g, col.b );

In the onplayerchat function I was putting the colours for each skin to show it in this function. skin colours are in RGB, if the player is not an admin the message is shows as i want but when is admin the name changes to the prefix colour, I was trying stop the prefix colour but without good results :/

I want stop the prefix colour then the server will take the rgb colour for the message.