Skin system?
#1

I have a problem with my gm , when i'm trying to change my skin with F4 , when i select <-- or --> to see the skins , game crashes ... could someone help me?
Reply
#2

Posting some code would help us find out what is wrong .
Reply
#3

just change the mode you change skin ... for example make a command "/skin" and the player type the skin id and it will get it ... is very simple. I have seen a FS on forum .. you can search it. Just an ideea.
Reply
#4

this is the link : Click
Reply
#5

thanx shady
Reply
#6

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Posting some code would help us find out what is wrong .
what kind of code? i have the skin system inside my gm , when you press F4 an you die , you can select your skin...but here i found this bug when i select my skin game crashes ... not just to me .. for all players . can you help me?
Reply
#7

onplayerrequestclass
Reply
#8

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
onplayerrequestclass
This is the code ...


Код:
public OnPlayerRequestClass(playerid, classid)
{
	new string[128];
	PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
	PlayerInfo[playerid][pModel] = Peds[classid][0];
	
	if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
	{
		ClearChatbox(playerid, 10);
		SendClientMessage(playerid, COLOR_GREEN, " Welcome to {F81414}ProNion {AFE7FF}- {F3FF02}The Godfather ");
		//SendClientMessage(playerid, COLOR_RED, " www.ExTreaM.Ro ");
		//SendClientMessage(playerid, COLOR_YELLOW2, " ");
		if (gPlayerAccount[playerid] != 0)
		{
			new loginstring[128];
			new loginname[64];
			GetPlayerName(playerid,loginname,sizeof(loginname));
			format(loginstring,sizeof(loginstring),"{FFFFFF}Welcome back, {F81414}%s \n \n{FFFFFF}Please enter your {6EF83C}password {FFFFFF}below:",loginname);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
			format(string, sizeof(string), "Enter in the Login Box your password , %s ! ", loginname);
            SendClientMessage(playerid, 0xFF7171FF, string);
		}
		else
		{
			gPlayerAccount[playerid] = 0;
 			new regstring[128];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"{FFFFFF}Welcome, {F81414}%s \n \n{FFFFFF}You dont have an account.\n \nPlease register your account by typing the password below:",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
			SendClientMessage(playerid, 0xFF7171FF, "You dont have an account, please register your account by typing the password in the Login Box.");
		}
		//PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
		PlayerInfo[playerid][pModel] = Peds[classid][0];
		SetPlayerTeamFromClass(playerid,classid);
	}
	//else SpawnPlayer(playerid);
	//return false;
	
 	if (classid == 1)
	{
			format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 2)
	{
			format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 3)
	{
			format(string, sizeof(string), "~y~> ~p~National Guard General ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 4)
	{
			format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 5)
	{
			format(string, sizeof(string), "~y~> ~p~The Mafia Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 6)
	{
			format(string, sizeof(string), "~y~> ~p~The Triads Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	/*else if (classid == 7)
	{
			format(string, sizeof(string), "~y~> ~p~Mayor ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}*/
	else if (classid == 8)
	{
			format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 9)
	{
			format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 10)
	{
			format(string, sizeof(string), "~y~> ~p~Taxi Cab Company Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 11)
	{
			format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 15)
	{
			format(string, sizeof(string), "~y~> ~p~Los Santos Vagos Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 16)
	{
			format(string, sizeof(string), "~y~> ~p~Varios Los Aztecas Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 17)
	{
			format(string, sizeof(string), "~y~> ~p~Ballas Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else if (classid == 18)
	{
			format(string, sizeof(string), "~y~> ~p~Grove Leader ~y~< ~n~Leaders only!");
			GameTextForPlayer(playerid,string,3500,6);
	}
	else
	{
		format(string, sizeof(string), "~y~> ~g~Civilian ~y~<");
		GameTextForPlayer(playerid,string,3500,6);
	}
	SetPlayerTeamFromClass(playerid,classid);
	SetupPlayerForClassSelection(playerid);
	return 1;
}

public SetupPlayerForClassSelection(playerid)
{
	switch (gTeam[playerid])
	{
		case TEAM_BLUE:
		{
			SetPlayerInterior(playerid,5);
			SetPlayerPos(playerid,323.4,305.6,999.1);
			SetPlayerFacingAngle(playerid, 90.0);
			SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7);
			SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7);

		}
		case TEAM_ADMIN:
		{
		    SetPlayerInterior(playerid,3);
			SetPlayerPos(playerid,-2654.4,1424.2,912.4);
			SetPlayerFacingAngle(playerid, 90.0);
			SetPlayerCameraPos(playerid,-2654.4-1.5,1424.2,912.4+0.7);
			SetPlayerCameraLookAt(playerid,-2654.4,1424.2,912.4+0.7);
		}
		default:
		{
		    SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid,-1657.5237,1207.6644,13.6719);
			SetPlayerFacingAngle(playerid,357.6906);
		    SetPlayerCameraPos(playerid, -1657.4678,1211.2292,13.6781);
		    SetPlayerCameraLookAt(playerid,-1657.5237,1207.6644,13.6719);
		}
	}
}

//---------------------------------------------------------

public SetPlayerTeamFromClass(playerid,classid)
{
 	if (classid >= 1 && classid <= 18)
	{
		gTeam[playerid] = 11; //admin
		PlayerInfo[playerid][pTeam] = 11;
	}
	else
	{
	    gTeam[playerid] = 3;
	    PlayerInfo[playerid][pTeam] = 3;
	}
}
Reply
#9

SOLVED ! it was from one of my Filterscripts xD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)