When does id change
player leaves, all id change?
player rejoins, all id change? map change? more people join? I'm not sure and I need to store specific infomation about a player like if I've already spawned him or what his steamID is so I know if he has reconnected within a specific time. currently doing something like this: player[id] = steamid player.[steamid][34] = id player.team[id] = team player.spawn[id] = 1/0 |
Re: When does id change
argh... no reply yet many views like all my other posts, I can't test no server to test on.. if you can't understand what I'm asking say so..
|
Re: When does id change
People are not machines. Be patient and also read the rules, don't bump until 15 days have passed from the previous message. Thanks.
|
Re: When does id change
It's only been 6 hours, you need to be patient. I just woke up.
Quote:
1. SteamID. Always the same for each Steam account. 2. UserID (get_user_userid()). You get a new one every time you connect (for the first time) to a server. This on is the same after a map change. 3. Entity Index (usually denoted by "id" in plugins). Is a number from 1 to 32 that tells you what entity the player is on the map. The first person to join the server gets 1. The second get 2 (if the first has not left). If 5 people have joined and the third person leaves then the next person to join will get 3. This one is not guaranteed to be the same after a mapchange. |
Re: When does id change
Arkshine I don't fancy waiting 15 days for a answer
the rules need fixing, so that only applys to spammers and suggestions/requests obviously if you have to wait 15 days for a question to be answered what's the point as I'm learning and likely to be asking ALOT of questions along the road. But yes fysiks thank you very much, I guess I'll have to save my questions for 18:45, when fysiks wakes up in USA to get a answer or something other then "Don't BUMP before 360 hours of debugging and going through poor documentation. -> RULES" Fysiks yes it's id in functions I'm referring to, so it does change every time someone leaves and a new player joins? I'm going to try and do something like this, but I can't find anything telling me how: /* player[id] = steamid player.[steamid][0] = id player.[steamid][1] = team player.[steamid][2] = spawn */ problem's im facing is how do I save a var with name player.'there steamid' PHP Code:
|
Re: When does id change
It looks like you are trying to do a C++ thing with the . in your variables, you can't do that in this language. Also, you cannot index an array with a string (works in PHP but not here).
In game you have to reference people by their entity index. If you wanting to save or retrieve something to or from a file or sql then you get their SteamID then. It's done this way in every plugin. |
Re: When does id change
Quote:
|
Re: When does id change
fysiks, the plugin im trying to create, is so players can join and spawn if the round is X% of round time into the round, X is set by a amx_cvar I made - but to prevent them reconnecting and spawning again, I need to save something in reference to them, so it has to be there steamid, an I need to save the team they were previously in after reconnecting so I can force them to join that again.
no I don't, I read what I said and I didn't mean fysiks waking up at bla time to help me in the way it came accross which was in a slave do now way.. I see what you're saying about views and I agree but the time for support isn't very good.. for me especially I appreciate what you're saying though, but Arkshine I highly doubt you didn't know the answer |
Re: When does id change
Quote:
|
Re: When does id change
fysiks I also need to know if I have spawned them, so should I just put the value as team - 1/0
|
| All times are GMT -4. The time now is 02:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.