Skinzzzzzz :(
#1

So I am changing from skin selection to command skin selection. Can anybody tell me how I would do something like this..

at top have the defines for bunch of skins...

pawn Код:
new Peds[10][1] = {
{160},//0
{256},
{263},
{262},
{261},
{260},
{259},
{258},
{257},
{256},
};
And then on a key button pressed, how would you change the skin either up, or down?
Reply
#2

Hope you can modify and understand something from it:

http://forum.sa-mp.com/index.php?top...877#msg1065877
Reply
#3

Made no sense, lol
Reply
#4

Alright so I've established, I can just do where they go up by skins, like

on a command,

SetPlayerSkin(GetPlayerSkin+1);

but, what if it is an invalid skin ID?
Reply
#5

Something like this mouse keys
Код:
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new Peds[10][1] = {
	{160},
	{256},
	{263},
	{262},
	{261},
	{260},
	{259},
	{258},
	{257},
	{256}
};
new Skin[MAX_PLAYERS];
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(PRESSED(128))
	{
		Skin[playerid] %= 10;
		SetPlayerSkin(playerid,Peds[Skin[playerid]][0]);
		printf("%d - %d",Skin[playerid],Peds[Skin[playerid]][0]);
		Skin[playerid]++;
	}
	if(PRESSED(4))
	{
		if(Skin[playerid] == -1) Skin[playerid] = 9;
		SetPlayerSkin(playerid,Peds[Skin[playerid]][0]);
		printf("%d - %d",Skin[playerid],Peds[Skin[playerid]][0]);
		Skin[playerid]--;
	}
	return 1;
}
Reply
#6

Thanks heaps, but since I haven't gone through pawno THAT far, is makes NO sense to me.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)