What's the interest to do this ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What's the interest to do this ? (
/showthread.php?tid=494851)
What's the interest to do this ? -
anou1 - 15.02.2014
Hi,
All is in the title
Код:
PlayerInfo[playerid][pHouseX] = 0;
PlayerInfo[playerid][pHouseY] = 0;
PlayerInfo[playerid][pHouseZ] = 0;
PlayerInfo[playerid][pHouseVW] = 0;
PlayerInfo[playerid][pHouseIntX] = 0;
PlayerInfo[playerid][pHouseIntY] = 0;
PlayerInfo[playerid][pHouseIntZ] = 0;
PlayerInfo[playerid][pHouseInt] = 0;
PlayerInfo[playerid][pHouseCarX] = 0;
PlayerInfo[playerid][pHouseCarY] = 0;
PlayerInfo[playerid][pHouseCarZ] = 0;
PlayerInfo[playerid][pHouseCarAngle] = 0;
PlayerInfo[playerid][pHouseCarId] = 0;
PlayerInfo[playerid][pHouseCarLocked] = 0;
PlayerInfo[playerid][pHouseCarColorChosen] = 0;
PlayerInfo[playerid][pHouseCarColor1] = 0;
PlayerInfo[playerid][pHouseCarColor2] = 0;
PlayerInfo[playerid][pHouseLevel] = 0;
PlayerInfo[playerid][pHouseSpawn] = 0;
PlayerInfo[playerid][pGotEntrance] = 0;
PlayerInfo[playerid][pGotCar] = 0;
PlayerInfo[playerid][pOwnsHouse] = 0;
PlayerInfo[playerid][pEnterHouse] = 0;
PlayerInfo[playerid][pMakingHouse] = 0;
With this for example, what's the interest to put it in OnPlayerConnect ?
Thank you
Re: What's the interest to do this ? -
GODEX - 15.02.2014
What are you asking us?
Re: What's the interest to do this ? -
anou1 - 15.02.2014
With this for example, what's the interest to put it in OnPlayerConnect ?
What's the interest to set the value to 0 when a player connect, then load it after ?
Re: What's the interest to do this ? -
MP2 - 15.02.2014
It resets the variables to 0 for newly-connecting players. If you didn't do this, you may end up having the variable from the player who left who had the same ID, for example if you had a variable for someone's admin level, and someone was level 10, when the left, and someone else joined with the same ID, they would be admin level 10. This is a bad example, but it's the general idea.
Re: What's the interest to do this ? -
anou1 - 15.02.2014
Oh, Okay thank you ! +Rep