SA-MP Forums Archive
Skin problems - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Skin problems (/showthread.php?tid=98702)



Skin problems - Anwix - 22.09.2009

I've created my include for oranizations ect.. its all working fine but my org skin command if i use:

Code:
stock SetPlayerOrgSkin(playerid, orgid)
{
	new Skin1 = oInfo[orgid][OrgSkin1];
	//new Skin2 = oInfo[orgid][OrgSkin2];
	
	if (GetPlayerSkin(playerid) != Skin1)
	{
	  SetPlayerSkin(playerid, Skin1);
	}
}
once i type my command, i get "SERVER: Unknown Command" and no skin change,
I do have my /oskin command finished in my main script, not the include:

Code:
dcmd_oskin(playerid, params[])
{
	if (pInfo[playerid][OrgID] != 4022) // Civilian
	{
	  new orgid = pInfo[playerid][OrgID];
		SetPlayerOrgSkin(playerid, orgid);
	}
	else
	{
	  SendClientMessage(playerid, COLOR_RED, "You are not in an organization.");
	}
	#pragma unused params
	return 1;
}
But, if i remove the If statement in my include it does change skin, im really confused by this, maybe someone could help me :S