Выбор скина.
#11

У меня всё через 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]
Reply


Messages In This Thread
Выбор скина. - by Johhnyllll - 05.10.2014, 13:28
Re: Выбор скина. - by Stepashka - 05.10.2014, 13:33
Re: Выбор скина. - by Johhnyllll - 05.10.2014, 13:37
Re: Выбор скина. - by Stepashka - 05.10.2014, 13:44
Re: Выбор скина. - by Johhnyllll - 05.10.2014, 13:49
Re: Выбор скина. - by Johhnyllll - 05.10.2014, 13:55
Re: Выбор скина. - by Stepashka - 05.10.2014, 14:33
Re: Выбор скина. - by OKStyle - 05.10.2014, 15:09
Re: Выбор скина. - by Johhnyllll - 05.10.2014, 15:38
Re: Выбор скина. - by OKStyle - 06.10.2014, 04:24
Re: Выбор скина. - by Johhnyllll - 06.10.2014, 10:41
Re: Выбор скина. - by Johhnyllll - 06.10.2014, 10:46
Re: Выбор скина. - by OKStyle - 06.10.2014, 15:31
Re: Выбор скина. - by Johhnyllll - 06.10.2014, 18:47
Re: Выбор скина. - by OKStyle - 07.10.2014, 03:24
Re: Выбор скина. - by Johhnyllll - 07.10.2014, 12:12
Re: Выбор скина. - by Johhnyllll - 07.10.2014, 12:28
Re: Выбор скина. - by Silicium - 07.10.2014, 12:35
Re: Выбор скина. - by Johhnyllll - 07.10.2014, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)