player info copies playerid 0
#1

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.
Reply
#2

Quote:

(not copied tho)

then show us your code.
Reply
#3

Reset player variables when he disconnects.

PHP код:
public OnPlayerDisconnect(playeridreason) {
     
PlayerInfo[playerid][...] = 0;
     return 
1;

Reset them AFTER the player stats have been saved.
Reply
#4

Damn Kush's tutorial all bugged, you gotta struggle on it and find your own way hahaha
Reply
#5

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.
Reply
#6

This is caused because the server does not have any value's to load.
When a player creates an account, set everything to 0.
Reply
#7

reset all variables.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)