SA-MP Forums Archive
Skin problem....Eeasy 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: Skin problem....Eeasy help. (/showthread.php?tid=293756)



Skin problem....Eeasy help. - Marshall32 - 29.10.2011

I want to make a Movable gate that works just for some skins and that for 265,266,267,284,285,286.

Here is what i done for yet.....
Code:
public OnPlayerUpdate(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid,2,-2946.31665039,465.48043823,6.68745375))
	{
	return 1;
	}
	return 1;
}
Also it works perfect but for all skins i want to make it that it works just for these skins
  1. 265
    266
    267
    284
    285
    286.
Thanks for all help....


Re: Skin problem....Eeasy help. - Pinguinn - 29.10.2011

EDIT:
I do not recommend you to use it at OnPlayerUpdate(..) because OnPlayerUpdate(..) is called around 3/4 times per second. You can better make a seperate timer of 1 second (less lag)

pawn Code:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,2,-2946.31665039,465.48043823,6.68745375))
    {
        switch(GetPlayerSkin(playerid))
        {
            case 265 .. 267, 284 .. 286:
            {
                // place here the script when the player has the skin (265 .. 267, 284 .. 286)
            }
        }
    }
    return 1;
}



Re: Skin problem....Eeasy help. - Marshall32 - 29.10.2011

Works man thank you.