SA-MP Forums Archive
Выбор скина. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Русский/Russian (https://sampforum.blast.hk/forumdisplay.php?fid=32)
+---- Thread: Выбор скина. (/showthread.php?tid=540529)



Выбор скина. - Johhnyllll - 05.10.2014

Здраствуйте,я на днях столкнулся с такой проблемой.
Я хачю сделать стандартный выбор скина чтоб было через кнопок от SA:MP тоесть через << >> OK(spawn)
Но у меня мод какбудто их пропускает и я спавнюсь в скине CJ.
Вот код каторый я старался сделать выбор скина:
Code:
   new i = 1;
   while(i < 300)
        {
                AddPlayerClass(i, 0.0,0.0,0.0,0.0, 25,100,31,1000,24,200);
                i++;
        }
Думаю вы мне поможите.


Re: Выбор скина. - Stepashka - 05.10.2014

В диапазоне 1..300 есть заваленные скины, это раз. Во-вторых, этот код не связан с кнопками выбора скина.


Re: Выбор скина. - Johhnyllll - 05.10.2014

Так можите помочь мне?Я начинающи,дайте мне совет как это исправить.


Re: Выбор скина. - Stepashka - 05.10.2014

В любом PEN или GF есть подобный код, можно посмотреть там.


Re: Выбор скина. - Johhnyllll - 05.10.2014

GF я знаю что это.А PEN я не встречал,сейчас посмотрю.


Re: Выбор скина. - Johhnyllll - 05.10.2014

Нет,такого рода когда я не нашел.


Re: Выбор скина. - Stepashka - 05.10.2014

Это самый первый гейммод, из него появился GF, полное название Public Enemy.


Re: Выбор скина. - OKStyle - 05.10.2014

Quote:
Originally Posted by Stepashka
View Post
В диапазоне 1..300 есть заваленные скины
Только 1 - 74, если говорить про диапазон 0..299. И то это решается правкой всем известного файла.

Автор, покажи код OnPlayerRequestClass.


Re: Выбор скина. - Johhnyllll - 05.10.2014

Вот:
Code:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid, 0);
	Send(playerid,C_YELLOW,"Добро пожаловать на "c_Grey"Corso DM");
	TogglePlayerControllable(playerid, 0);
	if(GetAccountID(playerid)) ShowDialog(playerid,dg_Log,DIALOG_STYLE_PASSWORD,""c_Yellow"• Corso Death Match •","{FFFFFF}Добро пожаловать на сервер "c_Yellow"Corso DM\n{FFFFFF}Ваш ник "c_Green"зарегистрирован{FFFFFF} на сервере\n\nВведите пароль:","Войти","Отмена"),timereg[playerid] = 30;
	else ShowDialog(playerid,dg_Reg1,DIALOG_STYLE_INPUT,""c_Yellow"• Corso Death Match •","{FFFFFF}Добро пожаловать на сервер "c_Yellow"Corso DM\n{FFFFFF}Чтобы начать игру - Вам необходимо пройти регистрацию\n\nВведите пароль для Вашего аккаунта\nОн потребуется каждый раз при входе на сервер\n\nВведите пароль в нижнем поле:","Дальше","Отмена"),timereg[playerid] = 60;
	return true;
}



Re: Выбор скина. - OKStyle - 06.10.2014

А при логине и спавне код?


Re: Выбор скина. - Johhnyllll - 06.10.2014

У меня всё через stock
stock SetPlayerSpawn(playerid)
[spoiler]
Code:
stock SetPlayerSpawn(playerid)
{
    if(duel[playerid] == 1)
	{
		 SpawnPlayer(sduel[playerid]);
		 new mesq[256];
		 format(mesq,sizeof(mesq),"Â Äóýëå ìåæäó %s[%d] è %s[%d] ïîáåäèë %s[%d]",sendername(sduel[playerid]),sduel[playerid],sendername(playerid),playerid,sendername(sduel[playerid]),sduel[playerid]);
		 SendDue(C_YELLOW,mesq);
		 duel[playerid] = 0;
		 duel[sduel[playerid]] = 0;
	}
	/*
	if(skin[playerid] == false)
	{
		TogglePlayerControllable(playerid, 0);
		SetPlayerVirtualWorld(playerid,playerid);
		SetHealth(playerid,100);
		SetPlayerPos(playerid,-2684.5952,1595.1729,111.2788);
		SetPlayerFacingAngle(playerid,177.2641);
		SetPlayerCameraPos(playerid,-2684.5952,1592.1729,111.2788);
		SetPlayerCameraLookAt(playerid,-2684.5952,1595.1729,111.2788);
		return true;
	}*/
	else
	{
		if(PlayerInfo[playerid][pJailed] == 1)
		{
		    SetHealth(playerid,100);
		    SetPlayerInterior(playerid, 6);
			SetPlayerPos(playerid,264.1425,77.4712,1001.0391);
			SetPlayerFacingAngle(playerid, 263.0160);
			SetPlayerVirtualWorld(playerid,1);
			SetPlayerColor(playerid,C_BLACK);
		}
		else
		{
		    switch(GetPVarInt(playerid,"gMission"))
		    {
		        case 0:
		        {
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
					SetPlayerVirtualWorld(playerid,0);
					SetPlayerColor(playerid,C_GREY);
				    new rand = random(sizeof(RandomSpawn));
		 			SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
		        }
		        case 1:
		        {
		            SetHealth(playerid,36);
				    GiveWeapon(playerid,24,300);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,1);
					new rand = random(sizeof(Deagle1));
					SetPlayerPos(playerid, Deagle1[rand][0], Deagle1[rand][1], Deagle1[rand][2]);
					SetPlayerColor(playerid,C_KICK);
		        }
		        case 2:
		        {
		            SetHealth(playerid,36);
				    GiveWeapon(playerid,24,300);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,2);
					new rand = random(sizeof(Deagle2));
					SetPlayerPos(playerid, Deagle2[rand][0], Deagle2[rand][1], Deagle2[rand][2]);
					SetPlayerColor(playerid,C_KICK);
		        }
		        case 3:
		        {
		            SetHealth(playerid,36);
				    GiveWeapon(playerid,24,300);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,3);
					new rand = random(sizeof(Deagle3));
					SetPlayerPos(playerid, Deagle3[rand][0], Deagle3[rand][1], Deagle3[rand][2]);
					SetPlayerColor(playerid,C_KICK);
		        }
		        case 4:
		        {
		            SetHealth(playerid,36);
				    GiveWeapon(playerid,24,300);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,4);
					new rand = random(sizeof(Deagle4));
					SetPlayerPos(playerid, Deagle4[rand][0], Deagle4[rand][1], Deagle4[rand][2]);
					SetPlayerColor(playerid,C_KICK);
		        }
		        case 5:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,5);
					new rand = random(sizeof(DM1));
					SetPlayerPos(playerid, DM1[rand][0], DM1[rand][1], DM1[rand][2]);
					SetPlayerColor(playerid,0xB74900FF);
		        }
		        case 6:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,6);
					new rand = random(sizeof(DM2));
					SetPlayerPos(playerid, DM2[rand][0], DM2[rand][1], DM2[rand][2]);
					SetPlayerColor(playerid,0xB74900FF);
		        }
		        case 7:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,7);
					new rand = random(sizeof(DM3));
					SetPlayerPos(playerid, DM3[rand][0], DM3[rand][1], DM3[rand][2]);
					SetPlayerColor(playerid,0xB74900FF);
		        }
		        case 8:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,8);
					new rand = random(sizeof(DM4));
					SetPlayerPos(playerid, DM4[rand][0], DM4[rand][1], DM4[rand][2]);
					SetPlayerColor(playerid,0xB74900FF);
		        }
		        case 9:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,9);
					new rand = random(sizeof(DM5));
					SetPlayerPos(playerid, DM5[rand][0], DM5[rand][1], DM5[rand][2]);
					SetPlayerColor(playerid,0xB74900FF);
		        }
		        case 10:
		        {
		            SetHealth(playerid,36);
				    GiveWeapon(playerid,24,300);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,10);
					new rand = random(sizeof(Deagle5));
					SetPlayerPos(playerid, Deagle5[rand][0], Deagle5[rand][1], Deagle5[rand][2]);
					SetPlayerColor(playerid,C_KICK);
		        }
		        case 11:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					TextDrawHideForPlayer(playerid, Textdraw[playerid]);
	                TextDrawHideForPlayer(playerid, Textdraw1[playerid]);
	                TextDrawHideForPlayer(playerid, Textdraw2[playerid]);
	                TextDrawShowForPlayer(playerid, Textdraw[playerid]);
	                TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
	                TextDrawShowForPlayer(playerid, Textdraw2[playerid]);
	                SetHealth(playerid,100);
        			SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,11);
		            if(gBand[playerid] == 1)
		            {
                        SetPlayerSkin(playerid, skinsnigga[random(14)]);
					    SetPlayerColor(playerid,0xFF0000AA);
					    SetPlayerPos(playerid, 2126.9006,-969.7060,58.1116);
		            }
		            if(gBand[playerid] == 2)
		            {
			            SetPlayerSkin(playerid, skinslatinos[random(14)]);
					    SetPlayerColor(playerid,0x2641FEAA);
					    SetPlayerPos(playerid,2056.3364,-997.6898,51.3359);
		            }
		        }
		        case 12:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,12);
					new rand = random(sizeof(DM6));
					SetPlayerPos(playerid, DM6[rand][0], DM6[rand][1], DM6[rand][2]);
					SetPlayerColor(playerid,0xB74900FF);
		        }
		        case 13:
		        {
		            GiveWeapon(playerid,34,150);
		            if(GetPVarInt(playerid,"spComand") == 1)
		            {
		                SetPlayerPos(playerid, -488.7736,-181.1390,78.2109);
						SetPlayerColor(playerid,C_BLUE);
      					SetPlayerSkin(playerid,285);
					}
					else if(GetPVarInt(playerid,"spComand") == 2)
		            {
		                SetPlayerPos(playerid, -537.1052,-56.2788,63.0445);
						SetPlayerColor(playerid,C_REPORT);
						SetPlayerSkin(playerid,287);
					}
					SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,13);
		        }
		        case 14:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            if(GetPVarInt(playerid,"stComand") == 1)
		            {
			            SetPlayerSkin(playerid, skinsRM[random(4)]);
		                SetPlayerPos(playerid, -530.5472,2584.8350,53.4154);
						SetPlayerColor(playerid,C_BLUE);
					}
					else if(GetPVarInt(playerid,"stComand") == 2)
		            {
		                SetPlayerSkin(playerid, skinsYak[random(4)]);
		                SetPlayerPos(playerid, -511.2230,2576.5313,53.4154);
						SetPlayerColor(playerid,C_RED);
					}
					SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,14);
		        }
		        case 15:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            if(GetPVarInt(playerid,"stComand") == 1)
		            {
			            SetPlayerSkin(playerid, skinsRM[random(4)]);
		                SetPlayerPos(playerid, -530.5472,2584.8350,53.4154);
						SetPlayerColor(playerid,C_BLUE);
					}
					else if(GetPVarInt(playerid,"stComand") == 2)
		            {
		                SetPlayerSkin(playerid, skinsYak[random(4)]);
		                SetPlayerPos(playerid, -511.2230,2576.5313,53.4154);
						SetPlayerColor(playerid,C_RED);
					}
					SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,15);
		        }
		        case 16:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            if(GetPVarInt(playerid,"stComand") == 1)
		            {
			            SetPlayerSkin(playerid, skinsRM[random(4)]);
		                SetPlayerPos(playerid, -530.5472,2584.8350,53.4154);
						SetPlayerColor(playerid,C_BLUE);
					}
					else if(GetPVarInt(playerid,"stComand") == 2)
		            {
		                SetPlayerSkin(playerid, skinsYak[random(4)]);
		                SetPlayerPos(playerid, -511.2230,2576.5313,53.4154);
						SetPlayerColor(playerid,C_RED);
					}
					SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,16);
		        }
		        case 17:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            if(GetPVarInt(playerid,"stComand") == 1)
		            {
			            SetPlayerSkin(playerid, skinsRM[random(4)]);
		                SetPlayerPos(playerid, -530.5472,2584.8350,53.4154);
						SetPlayerColor(playerid,C_BLUE);
					}
					else if(GetPVarInt(playerid,"stComand") == 2)
		            {
		                SetPlayerSkin(playerid, skinsYak[random(4)]);
		                SetPlayerPos(playerid, -511.2230,2576.5313,53.4154);
						SetPlayerColor(playerid,C_RED);
					}
					SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,17);
		        }
		        case 18:
		        {
		            GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun1"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun2"),1000);
					GiveWeapon(playerid, GetPVarInt(playerid,"PlayerGun3"),1000);
		            if(GetPVarInt(playerid,"stComand") == 1)
		            {
			            SetPlayerSkin(playerid, skinsRM[random(4)]);
		                SetPlayerPos(playerid, -530.5472,2584.8350,53.4154);
						SetPlayerColor(playerid,C_BLUE);
					}
					else if(GetPVarInt(playerid,"stComand") == 2)
		            {
		                SetPlayerSkin(playerid, skinsYak[random(4)]);
		                SetPlayerPos(playerid, -511.2230,2576.5313,53.4154);
						SetPlayerColor(playerid,C_RED);
					}
					SetHealth(playerid,100);
				    SetPlayerInterior(playerid, 0);
				    SetPlayerVirtualWorld(playerid,18);
		        }
		    }
		}
	}
 	return true;
}
[/spoiler]
stock OnPlayerLogin(playerid,password[])
[spoiler]
Code:
stock OnPlayerLogin(playerid,password[])
{
    new Pass[32],str[1000],string[128],query[256];
    f(query,"SELECT * FROM `players` WHERE `pNick` = '%s' LIMIT 1", sendername(playerid));
	if(mysql_query(query) && mysql_store_result())
	{
	    if(mysql_num_rows())
    	{
			if(mysql_fetch_row_format(str))
			{
				sscanf(str, "p<|>ds[24]s[34]s[50]s[60]ddds[30]dds[17]ds[30]dddddds[64]s[20]s[20]dddddd",
		        PlayerInfo[playerid][pID],sendername(playerid), Pass,
				PlayerInfo[playerid][pRegip],
				PlayerInfo[playerid][pEmail],
				PlayerInfo[playerid][pAdmin],
				PlayerInfo[playerid][pProverka],
				PlayerInfo[playerid][pBans],
				PlayerInfo[playerid][pDataReg],
				PlayerInfo[playerid][pKills],
				PlayerInfo[playerid][pDeaths],
				PlayerInfo[playerid][pDostup],
				PlayerInfo[playerid][pDsReg],
				PlayerInfo[playerid][pLastip],
				PlayerInfo[playerid][pMuted],
				PlayerInfo[playerid][pMuteTime],
				PlayerInfo[playerid][pJailed],
				PlayerInfo[playerid][pJailTime],
				PlayerInfo[playerid][pBanned],
				PlayerInfo[playerid][pBanTime339],
				PlayerInfo[playerid][pBanReason],
				PlayerInfo[playerid][pBanAdmin],
				PlayerInfo[playerid][pBanDate],
				PlayerInfo[playerid][pVip],
				PlayerInfo[playerid][pSer],
				PlayerInfo[playerid][pZax],
				PlayerInfo[playerid][pDmzon],
				PlayerInfo[playerid][pRazzon],
				PlayerInfo[playerid][pDue]);
				if(!(strcmp(password,Pass,true)))
				{
				    new ip[50],ipqu[66];
				    GetPlayerIp(playerid,ip,sizeof(ip));
				    f(ipqu,"SELECT `biped` FROM `ibaned` WHERE `biped` = '%s'", ip);
				    mysql_query(ipqu);
				    mysql_store_result();
				    if(mysql_num_rows() == 1)
					{
				        Send(playerid,C_RED,"Âàø IP àäðåñ çàáëîêèðîâàí!");
						GKick(playerid);
				    }
					else
					{
						if(PlayerInfo[playerid][pBanTime339] > gettime() && PlayerInfo[playerid][pBanned] == 1) ShowPlayerBanInfo(playerid);
						else PlayerInfo[playerid][pBanned] = 0;
						PlayerInfo[playerid][pLastip] = ip;
	                    if(PlayerInfo[playerid][pProverka] == 1 && GetPVarInt(playerid,"MEIL") == 0) return ShowDialog(playerid, D_MAINMENU+55, DIALOG_STYLE_INPUT,""c_Yellow"Ýëåêòðîííàÿ ïî÷òà", "{FFFFFF}Ó Âàñ ñòîèò ïðîâåðêà íà ýëåêòðîííóþ ïî÷òó.\nÂâåäèòå ñâîé Email:", "Ââîä", "Íàçàä");
						if(PlayerInfo[playerid][pLastip] != PlayerInfo[playerid][pRegip] && PlayerInfo[playerid][pProverka] == 2 && GetPVarInt(playerid,"MEIL") == 0)\
					 	return ShowDialog(playerid, D_MAINMENU+55, DIALOG_STYLE_INPUT,""c_Yellow"Ýëåêòðîííàÿ ïî÷òà", "{FFFFFF}Ó âàñ ñòîèò ïðîâåðêà íà ýëåêòðîííóþ ïî÷òó.\nÂâåäèòå ñâîé Email:", "Ââîä", "Íàçàä");
						//skin[playerid] = false;
						gLogAcc[playerid] = true;
						SpawnPlayer(playerid);
						TextDrawShowForPlayer(playerid,MiniStat[playerid]);
						f(string,"~l~Kills: ~r~%d~n~~l~Deaths: ~r~%d",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths]);
						TextDrawSetString(MiniStat[playerid],string);
				    	if(PlayerInfo[playerid][pAdmin] > 0)
				    	{
				    	    new astr[1000];
				    	    f(query,"SELECT * FROM `ainfo` WHERE `aNick`='%s' LIMIT 1", sendername(playerid));
							if(mysql_query(query) && mysql_store_result())
							{
							    if(mysql_num_rows())
						    	{
									if(mysql_fetch_row_format(astr))
									{
								        sscanf(astr, "p<|>ds[24]dddds[30]dd",
								        AdminInfo[playerid][aID],
										sendername(playerid),
										AdminInfo[playerid][aBans],
										AdminInfo[playerid][aMutes],
										AdminInfo[playerid][aJailes],
										AdminInfo[playerid][aKicks],
										AdminInfo[playerid][aOnline],
										AdminInfo[playerid][aAnss],
										AdminInfo[playerid][aWarns]);
					    			}
								}
							}
						}
					}
				}
			    else
				{
				    Send(playerid,C_RED,"Íå ïðàâèëüíûé ïàðîëü! Ïîâòîðèòå ïîïûòêó!");
					ShowDialog(playerid,dg_Log,DIALOG_STYLE_PASSWORD,""c_Yellow"• Corso Death Match •","{FFFFFF}Äîáðî ïîæàëîâàòü íà ñåðâåð "c_Yellow"Corso DM\n{FFFFFF}Âàø íèê "c_Green"çàðåãèñòðèðîâàí{FFFFFF} íà ñåðâåðå\n\nÂâåäèòå ïàðîëü:","Âîéòè","Îòìåíà");
				}
			}
		}
	}
	mysql_free_result();
	return true;
}
[/spoiler]


Re: Выбор скина. - Johhnyllll - 06.10.2014

Проблема в том что игрок спавнится в скине CJ,если по стандарту.
Я пробовал сделать и вот так:
pawn Code:
public OnGameModeInit()
{
    AddPlayerClassEx(2, 1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // The Truth
    return 1;
}
Но каждый игрок спавнится со скином "The Truth" тоесть ID 2.
P>S:я очистил public OnGameModeInit()чтоб было видно.
Я делал по уроку от http://wiki.sa-mp.com
Вот самма сылка: https://sampwiki.blast.hk/wiki/AddPlayerClassEx_RU


Re: Выбор скина. - OKStyle - 06.10.2014

Всё верно. У тебя игрок спавнится с первым скином из диапазона. Ты же до OnPlayerRequestClass его не доводишь даже. Либо в регу/логин добавь переменную скина, либо убери spawnplayer и ему подобные.


Re: Выбор скина. - Johhnyllll - 06.10.2014

Как добавить переменную сkина.Я не очень знаю прогромирование в Pawn


Re: Выбор скина. - OKStyle - 07.10.2014

В enum pInfo добавить переменную pSkin, в логин: SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);, а в регистрацию PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid). Лучше это даже в выборе скина делать, а не в спектакорском режиме. И в sscanf надо d ещё добавить в нужном месте.


Re: Выбор скина. - Johhnyllll - 07.10.2014

pawn Code:
if(skin[playerid] == false)
    {
        TogglePlayerControllable(playerid, 0);
        SetPlayerVirtualWorld(playerid,playerid);
        SetHealth(playerid,100);
        SetPlayerPos(playerid,-2684.5952,1595.1729,111.2788);
        SetPlayerFacingAngle(playerid,177.2641);
        SetPlayerCameraPos(playerid,-2684.5952,1592.1729,111.2788);
        SetPlayerCameraLookAt(playerid,-2684.5952,1595.1729,111.2788);
        return true;
    }
Этот код раньше работал с текстдравом в паре.У меня был выбор скина на TextDraw-ах.
Незнаю если поможет


Re: Выбор скина. - Johhnyllll - 07.10.2014

У меня был какойта паблик,SkipRequestClass или както так,каторый пропускает выбор скина(стандартный выбор скина) и остовляет только тот что на TextDraw-e.Но теперь я вижу выбор скина,ввожу пароль и он спавнит меня на точку спавна.А мне надо чтоб было Регистраций или Логин в игру а потомо уже выбор скина.
Вот картинка:



Re: Выбор скина. - Silicium - 07.10.2014

Скрин нормальный лучше бы сделал...


Re: Выбор скина. - Johhnyllll - 07.10.2014

Quote:
Originally Posted by Silicium
View Post
Скрин нормальный лучше бы сделал...
На скрине показано,что я должен при логине выбирать скин,а мне надо чтоб после входа в систему я выберал скин.