player info copies playerid 0 -
MrakBuster - 08.02.2018
Hello community,
today I have another problem that is consisting of.
When a player is 0, he registers account, play some time, some stuff, for example he changes color, buys some weapons, joins gang. He leaves.
Than another player joins, registers an account and when he does it, he gets all the stuff that the player before with id 0 had. This does not happen on another id other than 0.
If you could help me here, solve this problem, I would appreciate it more than much.
Thank you verry much. EDIT: I am using a Kush,s register system, located right here:
https://sampforum.blast.hk/showthread.php?tid=273088
This is the register system that I am using, so there has to be some problem there, you can count it as my code, since it looks very similiar. (not copied tho) - but even tho that i did not exactly copy it (kindof understod the code) i have no idea, what could this be, be causing.
Thanks again.
Re: player info copies playerid 0 -
PepsiCola23 - 08.02.2018
then show us your code.
Re: player info copies playerid 0 -
Private200 - 08.02.2018
Reset player variables when he disconnects.
PHP код:
public OnPlayerDisconnect(playerid, reason) {
PlayerInfo[playerid][...] = 0;
return 1;
}
Reset them
AFTER the player stats have been saved.
Re: player info copies playerid 0 -
wallen - 08.02.2018
Damn Kush's tutorial all bugged, you gotta struggle on it and find your own way hahaha
Re: player info copies playerid 0 -
Private200 - 08.02.2018
Quote:
Originally Posted by wallen
Damn Kush's tutorial all bugged, you gotta struggle on it and find your own way hahaha
|
That is the tutorial that I got my European Trucking gamemode based on from back 2014 when I first started working on it. It is not bugged at all if you know what to do.
Re: player info copies playerid 0 -
jasperschellekens - 09.02.2018
This is caused because the server does not have any value's to load.
When a player creates an account, set everything to 0.
Re: player info copies playerid 0 -
Mugala - 09.02.2018
reset all variables.