SA-MP Forums Archive
Help - 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: Help (/showthread.php?tid=531958)



Help - Rabea - 15.08.2014

Hello, i have mask system, i added to 24/7 its working fine, player buy mask normal but if he relogged he will still have the mask.
What i need is when player disconnect the mask remove.
I hope you will help me.
PS sorry for my bad english


Re: Help - Majd - 15.08.2014

Since I have no answer so guys this dude looks really need help I don't know alot about scripts so I can't help him but someone help him..

PS: feeling your feelings xD


Respuesta: Help - Cepillado - 15.08.2014

You need to set the mask in "pInfo" (or it could be something else depending of your script) to 0 on the OnPlayerDisconnect callback.

Example:
Код:
OnPlayerDisconnect(playerid,reason)
{
pInfo[playerid][pMask] = 0;
}
Note: This will also work if you use OnPlayerConnect or OnPlayerSpawn.


Re: Help - Rabea - 16.08.2014

i'm adding :
Код:
 PlayerInfo[playerid][pMask] = 0;
to public onplayerdisconnect, but the pawno stop working


Re: Help - Rabea - 16.08.2014

i added
Код:
 PlayerInfo[playerid][pMask] = 0;
to onplayerspawn and worked fine