Jump to content
  • 0

pomoc Port do neznáma


lgaming

Dotaz

Dobry den potrebujem pomoc ... a to je ze ked sa hrac pripoji na server tak ho to portne pod zem ... a spawne sa pri dedine ...
(toto neplati pre novacikov .. co sa pripoja prvy krat na server ) plati to iba pre tich to uz tam su registrovany ...

Mozno je chyba v interieroch ohladom domoch 

Lebo jeden kamos mi tam pridaval interieri do domu .. ze sa v House Menu  moze dat "Zmenit Interier" a tam su urcite interieri .. neviem ako to mam opravit ...

Dakujem za pomoc http://leteckaposta.cz/439471499

Link to comment
Share on other sites

15 odpovědí na tuto otázku

Recommended Posts

  • 0

Zkus vejít do interiéru a odpojit se pak se připoj počkej až se spawneš na pevné zemi a odpoj se. Pokud ti to bude dělat jenom při odpojení z interiéru, tak v publicu OnPlayerDisconnect nastav interiér a radši i virtual world na 0.

Link to comment
Share on other sites

  • 0

no ked som vosiel do interieru odpojil som sa tak ma to spawnulo pred dom :) to je ok .. ale jakmile niesom v dome (v interieri) tak ma to spawne uplne niekde inde

hej a jak to mam napisat ... to 

 

 

nastav interiér a radši i virtual world na 0.
Edited by lgaming
Link to comment
Share on other sites

  • 0

no tak:

//public OnPlayerDisconnect
new float:dX, float:dY, float:dZ,, way[32];
GetPlayerPos(playerid, dX, dY, dZ);
format(way,32,"SL577/%s.cfg",Name);

dini_FloatSet(way,"Pos_X", dX);
dini_FloatSet(way,"Pos_Y", dY);
dini_FloatSet(way,"Pos_Z", dZ);

//A do OnPlayerConnect
new way[32];
format(way,32,"SL577/%s.cfg",Name);
SetPlayerPos(playerid, dini_Float(way,"Pos_X"), dini_Float(way,"Pos_Y"), dini_Float(way,"Pos_Z"));



Ale nejdříve se koukni jestli to tam už nemáš ;)

Edited by D@ndys
Link to comment
Share on other sites

  • 0

public OnPlayerConnect(playerid)
{
    new Name[24];
	GetPlayerName(playerid,Name,24);
	
	if(!strcmp(Name, "SERVER", false))
	{
	    SendClientMessage(playerid,0xC0C0C0FF,"Invalid name.");
		return Kick(playerid);
	}

	if(playerid >= MAX_PLAYERS_EX)
	{
	    SendClientMessage(playerid,0xC0C0C0FF,"Server is full.");
		return Kick(playerid);
	}

	if(!IsPlayerNPC(playerid))
	{
	    for(new i=0; i<=Server[ConP]; i++)
		{
		    if(IsPlayerConnected(i))
		    {
				if(!IsPlayerNPC(i))
				{
	   				ShowPlayerNameTagForPlayer(playerid, i, true);
	   			}
			}
		}
		
		if(playerid > Server[ConP]) Server[ConP]=playerid;
	
		new way[32];
		format(way,32,"SL/%s.cfg",Name);

		/////////////////////////////////////////////

		Player[playerid][FalseLogin]=0;
		Player[playerid][Logged]=false;
		Player[playerid][RobTime]=0;
		Player[playerid][IPIP]=false;
		Player[playerid][Mute]=false;
		Player[playerid][FreezeP]=false;
		Player[playerid][ShowGangPickup]=0;
		Player[playerid][FirstSpawn]=true;
		Player[playerid][RegSpawn]=false;
		Player[playerid][PrisonTime]=0;
		Player[playerid][LottoNumber]=9999;
		Player[playerid][AFK]=false;
		Player[playerid][DragRacer]=0;
		Player[playerid][FNC_01]=0;
		Player[playerid][SelectedSkin]=9999;
		Player[playerid][DM_Player]=9999;
		Player[playerid][HouseWeaponType]=9999;
		Player[playerid][Hours]=0;
		Player[playerid][Minutes]=0;
		Player[playerid][Warnings]=0;
		Player[playerid][Specate]=false;
		Player[playerid][FNC_02]=0;
		Player[playerid][HouseID]=9999;
		Player[playerid][InternetBank]=0;
		Player[playerid][Skill]=1;
		Player[playerid][Skin]=293;
		Player[playerid][OilWell_ID]=9999;
		Player[playerid][VK_bool]=false;
		Player[playerid][LoadPlayerStats]=false;
		Player[playerid][PropertyID]=9999;
		Player[playerid][IsPlayerKidnapping]=false;
		Player[playerid][FirmP]=9999;
		Player[playerid][FirmID]=0;
		Player[playerid][BrigadaID]=9999;
		Player[playerid][BrigadaInfo]=9999;
		Player[playerid][BrigadaTime]=9999;
		Player[playerid][FNC_03]=0;
		Player[playerid][ClanP]=9999;
		Player[playerid][ClanID]=0;
		Player[playerid][ClanRank]=9999;
		Player[playerid][FNC_04]=0;
		Player[playerid][Clan_SaveVehSeries]=0;
		Player[playerid][RCON]=false;
		Player[playerid][MTBR_Player]=9999;
		Player[playerid][A_MapPointState]=false;
		Player[playerid][Bagety]=0;
		Player[playerid][Sprunk]=0;
		Player[playerid][Pivo]=0;
		Player[playerid][Vino]=0;
		Player[playerid][Whisky]=0;
		Player[playerid][Marihuana]=0;
		Player[playerid][Cigarety]=0;
		Player[playerid][CanEatInvB]=true;
		Player[playerid][Svetlica]=0;
		Player[playerid][Dynamit]=0;
		Player[playerid][Mina]=0;
		Player[playerid][Raptor]=0;
		Player[playerid][Predator]=0;
		Player[playerid][IsTDsHideForPlayer]=false;
		Player[playerid][Respect]=1;
		Player[playerid][Speed]=0;
		Player[playerid][FightingStyle]=FIGHT_STYLE_NORMAL;
		Player[playerid][IsPlayerJailed]=false;
		Player[playerid][MissionID]=9999;
		Player[playerid][MissionInfo]=9999;
		Player[playerid][Premie]=0;
		Player[playerid][Jointy]=0;
		Player[playerid][SpecSpawn]=false;
		Player[playerid][ToMuteTime]=0;
		Player[playerid][SpawnMoney]=0;
		SetPlayerInterior(playerid, 0);
		SetPlayerVirtualWorld(playerid, 0);
		
		ResetPlayerACMoney(playerid);
		
		UsePlayerStoppingAnimation[playerid]=false;
		
		IsPlayerUsingLoopingAnimation[playerid] = 0;
		PlayerAnimLibsPreloaded[playerid] = 0;

		Locator[playerid][State]=false;
		Locator[playerid][pX]=0.000000;
		Locator[playerid][pY]=0.000000;
		Locator[playerid][pZ]=50.000000;

		Player[playerid][DriftState]=false;

		Mobil[playerid][PlayingRingtone]=false;

		GivePlayerWeapon(playerid, 0, 1);

		Server[Connects]++;
		SetPlayerColor(playerid, COLOR_WHITE_UNVISIBLE);

		dini_IntSet("SL/Server/Info.cfg","Connects",Server[Connects]);

mam tam toto :) tak upravil by si mi to tak aby som tam mal aj to co si mi napisal

este tu je toto 

public OnPlayerSpawn(playerid)
{
    AntiDeAMX();

	if(!IsPlayerNPC(playerid))
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(Player[playerid][SpecSpawn] == true)
	        {
	            Player[playerid][SpecSpawn] = false;
				LoadPlayerLastStats(playerid);
	        }
	        else
	        {
				SetPlayerSkill(playerid, Player[playerid][Skill]);
				SetPlayerRespect(playerid, Player[playerid][Respect]);

			    TextDrawHideForPlayer(playerid, PrisonTD[playerid]);

			    ResetPlayerWeapons(playerid);
			    SetPlayerVirtualWorld(playerid, 0);
			    SetPlayerInterior(playerid, 0);
			    PlayerCameraBack(playerid);
			    SetPlayerDrunkLevel(playerid, 0);
			    SetPlayerHealth(playerid, 100.000);
			    SetPlayerArmour(playerid, 0.000);
			    Player[playerid][FNC_01]=0;

				Player[playerid][IPIP]=true;
				SetTimerEx("IsPlayerInPickupFalse",1500,0,"i",playerid);
						
			    SetPlayerSkin(playerid, Player[playerid][Skin]);
			    
			    UsePlayerStoppingAnimation[playerid]=false;

			    new way[32], Name[24];
			    GetPlayerName(playerid,Name,24);
			    format(way,32,"SL/%s.cfg",Name);

			    if(Player[playerid][ClanP] != 9999) Player[playerid][Team] = 99;

			    if(Player[playerid][RegSpawn]==true)
				{
			    	SetPlayerACMoney(playerid,60000);
			    	SetPlayerSkin(playerid, 293);
			    	Player[playerid][Skin] = 293;
			        Player[playerid][Team] = 0;
			        Player[playerid][FirstSpawn] = false;
			        Player[playerid][RegSpawn] = false;
			        GivePlayerWeapon(playerid,5,1);
			        GivePlayerWeapon(playerid,22,50);
			        SetPlayerPos(playerid,1247.9,-1560,13.5);

				    FormatPlayerInfoBox(playerid, "~g~Mobil", "~w~Mas ~y~1~w~ novou zpravu !~n~Pouzi ~y~/mobil", 5000);

				    new m9x_way[64];
					format(m9x_way,64,"SL/Server/MobilNumbers/%d.cfg", Mobil[playerid][MobilNumber]);

					dini_Set   (m9x_way, "MSG0_text", "Vitame ta na serveri, toto je len testovacia sms, prosim, neodpovedaj na tuto sms. Admin team.");
					dini_IntSet(m9x_way, "MSG0_from", 999999);
					dini_IntSet(m9x_way, "MSG0_read", 1);

					dini_IntSet(m9x_way, "Messages", 1);
			    }
				else
				{
				    if(!PlayerAnimLibsPreloaded[playerid])
					{
				   		ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0,0,0);
				   		ApplyAnimation(playerid,"RAPPING","null",0.0,0,0,0,0,0);
				    	ApplyAnimation(playerid,"SHOP","null",0.0,0,0,0,0,0);
				   		ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
				   		ApplyAnimation(playerid,"SMOKING","null",0.0,0,0,0,0,0);
				    	ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);
				    	ApplyAnimation(playerid,"ON_LOOKERS","null",0.0,0,0,0,0,0);
				    	ApplyAnimation(playerid,"DEALER","null",0.0,0,0,0,0,0);
						ApplyAnimation(playerid,"CRACK","null",0.0,0,0,0,0,0);
						ApplyAnimation(playerid,"CARRY","null",0.0,0,0,0,0,0);
						ApplyAnimation(playerid,"COP_AMBIENT","null",0.0,0,0,0,0,0);
						ApplyAnimation(playerid,"PARK","null",0.0,0,0,0,0,0);
						ApplyAnimation(playerid,"INT_HOUSE","null",0.0,0,0,0,0,0);
						ApplyAnimation(playerid,"FOOD","null",0.0,0,0,0,0,0);

						PlayerAnimLibsPreloaded[playerid] = 1;
					}
					
					///////////////////////////////////////////
				
					if(Player[playerid][Team]==0)
					{
			       		GivePlayerWeapon(playerid,5,1);
			        	GivePlayerWeapon(playerid,22,30);
		 			}
					else if(Player[playerid][Team]==1)
					{
			       		GivePlayerWeapon(playerid,22,85);
			        	GivePlayerWeapon(playerid,32,220);
			        	GivePlayerWeapon(playerid,4,1);
			        	GivePlayerWeapon(playerid,30,120);
					}
					else if(Player[playerid][Team]==2)
					{
			      		GivePlayerWeapon(playerid,22,55);
			        	GivePlayerWeapon(playerid,28,185);
			        	GivePlayerWeapon(playerid,5,1);
			        	GivePlayerWeapon(playerid,30,105);
			        	GivePlayerWeapon(playerid,27,55);
					}
					else if(Player[playerid][Team]==3)
					{
			        	GivePlayerWeapon(playerid,24,40);
			        	GivePlayerWeapon(playerid,28,75);
			        	GivePlayerWeapon(playerid,5,1);
			        	GivePlayerWeapon(playerid,35,1);
			        	GivePlayerWeapon(playerid,30,185);
			        	GivePlayerWeapon(playerid,25,50);
			    	}
					else if(Player[playerid][Team]==4)
					{
			        	GivePlayerWeapon(playerid,22,70);
			        	GivePlayerWeapon(playerid,32,115);
			        	GivePlayerWeapon(playerid,4,1);
			        	GivePlayerWeapon(playerid,26,125);
			        	GivePlayerWeapon(playerid,30,100);
					}
					else if(Player[playerid][Team]==5)
					{
			        	GivePlayerWeapon(playerid,29,90);
			        	GivePlayerWeapon(playerid,31,175);
			        	GivePlayerWeapon(playerid,3,1);
			        	GivePlayerWeapon(playerid,34,5);
			        	SetPlayerArmour(playerid, 100.0);
					}
					else if(Player[playerid][Team]==6)
					{
			        	GivePlayerWeapon(playerid,30,350);
			        	GivePlayerWeapon(playerid,27,28);
			        	GivePlayerWeapon(playerid,8,1);
					}
					else if(Player[playerid][Team]==7)
					{
			        	GivePlayerWeapon(playerid,28,180);
			        	GivePlayerWeapon(playerid,18,5);
			        	GivePlayerWeapon(playerid,24,45);
			        	GivePlayerWeapon(playerid,22,80);
					}
					else if(Player[playerid][Team]==8)
					{
			        	GivePlayerWeapon(playerid,30,240);
			        	GivePlayerWeapon(playerid,4,1);
			        	GivePlayerWeapon(playerid,23,100);
			        	GivePlayerWeapon(playerid,27,45);
		 			}
					else if(Player[playerid][Team]==9)
					{
			        	GivePlayerWeapon(playerid,28,200);
			        	GivePlayerWeapon(playerid,23,45);
			        	GivePlayerWeapon(playerid,27,35);
		 			}
					 else if(Player[playerid][Team]==10)
					{
			        	GivePlayerWeapon(playerid,25,100);
			        	GivePlayerWeapon(playerid,22,50);
			        	GivePlayerWeapon(playerid,5,1);
			        	SetPlayerArmour(playerid, 100.0);
		 			}
					else if(Player[playerid][Team]==11)
					{
			        	GivePlayerWeapon(playerid,25,75);
			        	GivePlayerWeapon(playerid,29,120);
			        	GivePlayerWeapon(playerid,3,1);
			        	GivePlayerWeapon(playerid,22,60);
		 			}
					else if(Player[playerid][Team]==12)
					{
			        	GivePlayerWeapon(playerid,5,1);
			        	GivePlayerWeapon(playerid,33,100);
		 			}
					else if(Player[playerid][Team]==13)
					{
			        	GivePlayerWeapon(playerid,5,1);
			        	GivePlayerWeapon(playerid,33,100);
		 			}
					else if(Player[playerid][Team]==14)
					{
			        	GivePlayerWeapon(playerid,4,1);
			        	GivePlayerWeapon(playerid,22,100);
			        	GivePlayerWeapon(playerid,25,50);
		 			}
					else if(Player[playerid][Team]==15)
					{
			        	GivePlayerWeapon(playerid,3,1);
			        	GivePlayerWeapon(playerid,24,30);
			        	GivePlayerWeapon(playerid,32,120);
			        	GivePlayerWeapon(playerid,16,5);
		 			}
					else if(Player[playerid][Team]==16)
					{
			        	GivePlayerWeapon(playerid,27,70);
			        	GivePlayerWeapon(playerid,28,200);
			        	GivePlayerWeapon(playerid,31,250);
			        	GivePlayerWeapon(playerid,34,5);
		 			}
					else if(Player[playerid][Team]==17)
					{
			        	GivePlayerWeapon(playerid,42,250);
			        	GivePlayerWeapon(playerid,24,200);
		 			}
					else if(Player[playerid][Team]==18)
					{
			        	GivePlayerWeapon(playerid,43,25);
			        	GivePlayerWeapon(playerid,22,130);
		 			}
					else if(Player[playerid][Team]==19)
					{
			        	GivePlayerWeapon(playerid,25,80);
			        	GivePlayerWeapon(playerid,33,50);
			        	GivePlayerWeapon(playerid,4,1);
					}
					else if(Player[playerid][Team]==20)
					{
			        	GivePlayerWeapon(playerid,26,75);
			        	GivePlayerWeapon(playerid,32,150);
			        	GivePlayerWeapon(playerid,4,1);
					}
					else if(Player[playerid][Team]==21)
					{
			        	GivePlayerWeapon(playerid,33,50);
					}
					else if(Player[playerid][Team]==22)
					{
			        	GivePlayerWeapon(playerid,25,50);
			        	GivePlayerWeapon(playerid,29,150);
						GivePlayerWeapon(playerid,24,30);
			        	GivePlayerWeapon(playerid,3,1);
					}
					else if(Player[playerid][Team]==23)
					{
			        	GivePlayerWeapon(playerid,33,100);
			        	GivePlayerWeapon(playerid,42,250);
					}
					else if(Player[playerid][Team]==24)
					{
			        	GivePlayerWeapon(playerid,31,200);
			        	GivePlayerWeapon(playerid,27,75);
						GivePlayerWeapon(playerid,29,90);
					}
					else if(Player[playerid][Team]==25)
					{
			        	GivePlayerWeapon(playerid,29,250);
			        	GivePlayerWeapon(playerid,27,50);
					}
					else if(Player[playerid][Team]==26)
					{
			        	GivePlayerWeapon(playerid,30,150);
			        	GivePlayerWeapon(playerid,27,50);
						GivePlayerWeapon(playerid,29,90);
					}
					else if(Player[playerid][Team]==27)
					{
			        	GivePlayerWeapon(playerid,32,150);
			        	GivePlayerWeapon(playerid,22,70);
			        	GivePlayerWeapon(playerid,4,1);
					}
					else if(Player[playerid][Team]==28)
					{
			        	GivePlayerWeapon(playerid,31,100);
			        	GivePlayerWeapon(playerid,28,150);
						GivePlayerWeapon(playerid,27,80);
			        	GivePlayerWeapon(playerid,3,1);
					}
					
					if(Player[playerid][ClanP] != 9999) //ak je hrac v clane
					{
					    if(Player[playerid][ClanRank] != 9999)
					    {
					        if(Player[playerid][HouseP] == 9999 || Player[playerid][FirstSpawn]==true)
					        {
							    ResetPlayerWeapons(playerid);
				 				SetPlayerPos(playerid, Clan[Player[playerid][ClanP]][cpiX], Clan[Player[playerid][ClanP]][cpiY], Clan[Player[playerid][ClanP]][cpiZ]);
				 				SetPlayerInterior(playerid, Clan[Player[playerid][ClanP]][cIntID]);
				 				SetPlayerVirtualWorld(playerid, Clan[Player[playerid][ClanP]][cVWID]);

				 				new clanid = Player[playerid][ClanP];
				 				new w[8][32];
				 				new a[8][16];
				 				new cway[64];
				 				format(cway,64, "SL/Server/Clans/Clan%d.cfg", clanid);

				 				SetPlayerColor(playerid, dini_Int(cway, "Color"));

				 				for(new x=0; x<8; x++)
				 				{
				 				    new W_id[16];
				 				    format(W_id,16, "W%d_id", x);
				 				    new W_ammo[16];
				 				    format(W_ammo,16, "W%d_ammo", x);

				 				    if(dini_Int(cway, W_id) == 0)
									{
										format(w[x],32, "{090909}- empty -");
										format(a[x],16, " ");
									}
				 				    else
									{
										format(w[x],32, "{ffffff}%s", WeaponName(dini_Int(cway, W_id)));
										format(a[x],16, " (%dks)", dini_Int(cway, W_ammo));
									}
				 				}

				 					 if(dini_Int(cway, "WeaponSlots") == 3) format(gBIGSTRING,sizeof(gBIGSTRING), "%s%s\n%s%s\n%s%s", w[0],a[0],w[1],a[1],w[2],a[2]);
				 				else if(dini_Int(cway, "WeaponSlots") == 4) format(gBIGSTRING,sizeof(gBIGSTRING), "%s%s\n%s%s\n%s%s\n%s%s", w[0],a[0],w[1],a[1],w[2],a[2],w[3],a[3]);
				 				else if(dini_Int(cway, "WeaponSlots") == 5) format(gBIGSTRING,sizeof(gBIGSTRING), "%s%s\n%s%s\n%s%s\n%s%s\n%s%s", w[0],a[0],w[1],a[1],w[2],a[2],w[3],a[3],w[4],a[4]);
				 				else if(dini_Int(cway, "WeaponSlots") == 6) format(gBIGSTRING,sizeof(gBIGSTRING), "%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s", w[0],a[0],w[1],a[1],w[2],a[2],w[3],a[3],w[4],a[4],w[5],a[5]);
				 				else if(dini_Int(cway, "WeaponSlots") == 7) format(gBIGSTRING,sizeof(gBIGSTRING), "%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s", w[0],a[0],w[1],a[1],w[2],a[2],w[3],a[3],w[4],a[4],w[5],a[5],w[6],a[6]);
				 				else if(dini_Int(cway, "WeaponSlots") == 8) format(gBIGSTRING,sizeof(gBIGSTRING), "%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s", w[0],a[0],w[1],a[1],w[2],a[2],w[3],a[3],w[4],a[4],w[5],a[5],w[6],a[6],w[7],a[7]);

				 				Player[playerid][FNC_04]=0;

							    ShowPlayerDialog(playerid,Dialog_ClanWList,DIALOG_STYLE_LIST,"Výber zbraní",gBIGSTRING,"OK","Cancel");
						    }
						}
					}
					if(Player[playerid][IsPlayerJailed] == true)
					{
			        	ResetPlayerWeapons(playerid);
		 				SetPlayerPos(playerid,198.3,162.017,1004);
		 				SetPlayerInterior(playerid,3);
		 				SetPlayerVirtualWorld(playerid,2997);
		 				TextDrawHideForPlayer(playerid,PrisonTD[playerid]);
		 				TextDrawShowForPlayer(playerid,PrisonTD[playerid]);
		 				return 0;
					}

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

					new cway0f00[64];
					if(Player[playerid][ClanP] != 9999) format(cway0f00,64, "SL/Server/Clans/Clan%d.cfg", Player[playerid][ClanP]);

						 if(Player[playerid][Team] == 0)  SetPlayerColor(playerid, COLOR_WHITE);
					else if(Player[playerid][Team] == 1)  SetPlayerColor(playerid, COLOR_GREEN_LIGHT);
					else if(Player[playerid][Team] == 2)  SetPlayerColor(playerid, COLOR_PURPLE);
					else if(Player[playerid][Team] == 3)  SetPlayerColor(playerid, COLOR_YELLOW);
					else if(Player[playerid][Team] == 4)  SetPlayerColor(playerid, COLOR_GRAY);
					else if(Player[playerid][Team] == 5)  SetPlayerColor(playerid, COLOR_BLUE);
					else if(Player[playerid][Team] == 6)  SetPlayerColor(playerid, COLOR_GREEN_DARK);
					else if(Player[playerid][Team] == 7)  SetPlayerColor(playerid, COLOR_KHAKI);
					else if(Player[playerid][Team] == 8)  SetPlayerColor(playerid, COLOR_BLACK_UNVISIBLE);
					else if(Player[playerid][Team] == 9)  SetPlayerColor(playerid, COLOR_GREEN);
					else if(Player[playerid][Team] == 10) SetPlayerColor(playerid, COLOR_YELLOWGREEN);
					else if(Player[playerid][Team] == 11) SetPlayerColor(playerid, COLOR_BLUE);
					else if(Player[playerid][Team] == 12) SetPlayerColor(playerid, COLOR_ORANGE);
					else if(Player[playerid][Team] == 13) SetPlayerColor(playerid, COLOR_CYAN);
					else if(Player[playerid][Team] == 14) SetPlayerColor(playerid, COLOR_RED);
					else if(Player[playerid][Team] == 15) SetPlayerColor(playerid, COLOR_REDORANGE);
					else if(Player[playerid][Team] == 16) SetPlayerColor(playerid, COLOR_BROWN);
					else if(Player[playerid][Team] == 17) SetPlayerColor(playerid, COLOR_RED_DARK);
					else if(Player[playerid][Team] == 18) SetPlayerColor(playerid, COLOR_BLUE_DARK);
					else if(Player[playerid][Team] == 19) SetPlayerColor(playerid, COLOR_BLUE);
					else if(Player[playerid][Team] == 20) SetPlayerColor(playerid, COLOR_PINK_DARK);
					else if(Player[playerid][Team] == 21) SetPlayerColor(playerid, COLOR_BLUE_DARK);
					else if(Player[playerid][Team] == 22) SetPlayerColor(playerid, COLOR_BLUE);
					else if(Player[playerid][Team] == 23) SetPlayerColor(playerid, COLOR_RED_DARK);
					else if(Player[playerid][Team] == 24) SetPlayerColor(playerid, COLOR_BROWN);
					else if(Player[playerid][Team] == 25) SetPlayerColor(playerid, COLOR_BLUE);
					else if(Player[playerid][Team] == 26) SetPlayerColor(playerid, COLOR_RED_LIGHT);
					else if(Player[playerid][Team] == 27) SetPlayerColor(playerid, COLOR_BLACKGREEN);
					else if(Player[playerid][Team] == 28) SetPlayerColor(playerid, COLOR_BLUE_LIGHT);
					else if(Player[playerid][ClanP] != 9999) SetPlayerColor(playerid, dini_Int(cway0f00, "Color"));
					else if(Player[playerid][Team] == 100) SetPlayerColor(playerid, COLOR_WHITE_UNVISIBLE);

					//==================================================================

			    	if(Player[playerid][FirstSpawn]==false)
					{
			    			 if(Player[playerid][Team]==0)  SetPlayerPos(playerid,1247.9,-1560,13.5);
		 				else if(Player[playerid][Team]==1)  SetPlayerPos(playerid,2512.238,-1665.44,13.72);
						else if(Player[playerid][Team]==2)  SetPlayerPos(playerid,2460.511,-1389.657,24.18);
						else if(Player[playerid][Team]==3)  SetPlayerPos(playerid,2681.585,-1402.5,30.65);
			    		else if(Player[playerid][Team]==4)  SetPlayerPos(playerid,2261.424,-1906.548,15.19);
						else if(Player[playerid][Team]==5)  SetPlayerPos(playerid,1275.044,-1662.776,19.734);
						else if(Player[playerid][Team]==6)  SetPlayerPos(playerid,2189.4,-2262.0,13.4);
						else if(Player[playerid][Team]==7)  SetPlayerPos(playerid,-1687.8872070313,-18.303468704224,3.5546875);
						else if(Player[playerid][Team]==8)  SetPlayerPos(playerid,1831.054,-1108.974,23.9);
		                else if(Player[playerid][Team]==9)  SetPlayerPos(playerid,1341.356,-1675.227,17.715);
		 				else if(Player[playerid][Team]==10) SetPlayerPos(playerid,2151.487,-1807.884,13.546);
		 				else if(Player[playerid][Team]==11) SetPlayerPos(playerid,1554.952,-1675.59,16.195);
		 				else if(Player[playerid][Team]==12) SetPlayerPos(playerid,2137.989,-1905.364,13.546);
		 				else if(Player[playerid][Team]==13) SetPlayerPos(playerid,1576.791,-1479.614,14.212);
		 				else if(Player[playerid][Team]==14) SetPlayerPos(playerid,1172.788,-1323.434,15.4);
		 				else if(Player[playerid][Team]==15) SetPlayerPos(playerid,967.77,-1252.67,16.956);
		 				else if(Player[playerid][Team]==16) SetPlayerPos(playerid,285.164,2002.722,17.64);
		 				else if(Player[playerid][Team]==17) SetPlayerPos(playerid,1740.384,-1456.816,13.525);
		 				else if(Player[playerid][Team]==18) SetPlayerPos(playerid,732.647,-1337.733,13.533);
		 				else if(Player[playerid][Team]==19) SetPlayerPos(playerid,2333.949,51.892,26.484);
		 				else if(Player[playerid][Team]==20) SetPlayerPos(playerid,-2178.4504394531,-223.88455200195,36.519073486328);
		 				else if(Player[playerid][Team]==21) SetPlayerPos(playerid,-2521.3037109375,-624.64526367188,132.78244018555);
		 				else if(Player[playerid][Team]==22) SetPlayerPos(playerid,-1605.5047607422,711.10198974609,13.8671875);
		 				else if(Player[playerid][Team]==23) SetPlayerPos(playerid,-2026.3106689453,67.152297973633,28.691593170166);
		 				else if(Player[playerid][Team]==24) SetPlayerPos(playerid,-1526.2415771484,485.71505737305,7.1796875);
		 				else if(Player[playerid][Team]==25) SetPlayerPos(playerid,-2455.6298828125,503.88360595703,30.078125);
		 				else if(Player[playerid][Team]==26) SetPlayerPos(playerid,-1643.1689453125,1385.2122802734,7.1796875);
		 				else if(Player[playerid][Team]==27) SetPlayerPos(playerid,-1864.6663818359,-1559.3851318359,22.2109375);
		 				else if(Player[playerid][Team]==28) SetPlayerPos(playerid,-2172.7509765625,680.07299804688,55.162162780762);

						//--------------------------------------------------------------
			    		if(Player[playerid][HouseP]!=9999 && Player[playerid][IsPlayerJailed]==false && Player[playerid][DM_Player]==9999 && Player[playerid][LoadPlayerStats]==false)
						{
							ShowPlayerDialog(playerid,Dialog_HouseSpawn,DIALOG_STYLE_MSGBOX,"House Spawn","Vyber si kam se chceš spawnout","Job","Dům");
							SetPlayerCameraPos(playerid,1061.720,-1492.135,30.504);
							SetPlayerCameraLookAt(playerid,1464.758,-1222.032,91.411);
							Player[playerid][IPIP]=true;
						}
						//--------------------------------------------------------------
						if(Player[playerid][DM_Player]!=9999)
						{
						    TogglePlayerControllable(playerid, 0);
						    ResetPlayerWeapons(playerid);
						    SetPlayerArmour(playerid,100);
						    SetPlayerVirtualWorld(playerid,200);
						    GivePlayerWeapon(playerid,DM[Weapon1],50000);
						    GivePlayerWeapon(playerid,DM[Weapon2],50000);
						    GivePlayerWeapon(playerid,DM[Weapon3],50000);
						    HidePlayerMarker(playerid);

						    	 if(Player[playerid][DM_Player]==1)  SetPlayerPos(playerid,619.10833740,896.28710938,-42.53791809);
						    else if(Player[playerid][DM_Player]==2)  SetPlayerPos(playerid,576.04296875,833.89941406,-30.16480637);
						    else if(Player[playerid][DM_Player]==3)  SetPlayerPos(playerid,496.78027344,929.79394531,-17.40005684);
						    else if(Player[playerid][DM_Player]==4)  SetPlayerPos(playerid,501.41918945,812.36700439,-3.22333908);
						    else if(Player[playerid][DM_Player]==5)  SetPlayerPos(playerid,677.67694092,827.03723145,-27.84430695);
						    else if(Player[playerid][DM_Player]==6)  SetPlayerPos(playerid,587.29632568,870.67816162,-42.14631271);
						    else if(Player[playerid][DM_Player]==7)  SetPlayerPos(playerid,623.95996094,894.78222656,-35.11788940);
						    else if(Player[playerid][DM_Player]==8)  SetPlayerPos(playerid,716.28710938,907.62988281,-19.05780792);
						    else if(Player[playerid][DM_Player]==9)  SetPlayerPos(playerid,591.83886719,939.70996094,-41.84207153);
						    else if(Player[playerid][DM_Player]==10) SetPlayerPos(playerid,534.82421875,836.23632812,-41.18457794);
						}

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

					}
					else
					{
			        	Player[playerid][FirstSpawn]=false;

			        	SetPlayerPos(playerid, dini_Float(way,"Pos_X"), dini_Float(way,"Pos_Y"), dini_Float(way,"Pos_Z")+0.1750);
			        	SetPlayerACMoney(playerid, dini_Int(way,"LastMoney"));
			        	Player[playerid][Team] = dini_Int(way,"Team");
			        	SetPlayerVirtualWorld(playerid, dini_Int(way,"World"));
			        	SetPlayerInterior(playerid, dini_Int(way,"Interior"));
			        	SetPlayerHealth(playerid, dini_Float(way,"LastHP"));
			        	SetPlayerArmour(playerid, dini_Float(way,"LastArmour"));
			        	SetPlayerSkin(playerid, dini_Int(way,"LastSkin"));
			        	Player[playerid][Skin] = dini_Int(way,"LastSkin");

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

			        	if(GetPlayerVirtualWorld(playerid) >= 10000 && GetPlayerVirtualWorld(playerid) <= (10000 + MAX_FIRMS)) Player[playerid][FirmID] = (GetPlayerVirtualWorld(playerid) - 10000);

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

			        	new mobil_way_D00W[64];
			        	format(mobil_way_D00W,64, "SL/Server/MobilNumbers/%d.cfg", Mobil[playerid][MobilNumber]);

			        	new messages=0;

			        	for(new m=0; m<11; m++)
			        	{
			        	    new MSG_read[16];
			        	    format(MSG_read,16, "MSG%d_read", m);
			        	    if(dini_Int(mobil_way_D00W, MSG_read) == 1) messages++;
			        	}

			        	if(messages > 0)
			        	{
				        	if(messages >= 5) format(gBIGSTRING,sizeof(gBIGSTRING),"~w~Mas ~y~%d~w~ novych zprav !", messages);
				        	else if(messages >  1) format(gBIGSTRING,sizeof(gBIGSTRING),"~w~Mas ~y~%d~w~ nove zpravy !", messages);
				        	else if(messages == 1) format(gBIGSTRING,sizeof(gBIGSTRING),"~w~Mas ~y~1~w~ novou zpravu !");

				        	FormatPlayerInfoBox(playerid, "~g~Mobil", gBIGSTRING, 3500);
			        	}
			    	}
			}
		}
	}
	return 1;
}
Edited by lgaming
Link to comment
Share on other sites

  • 0

no tak:

//public OnPlayerDisconnect
new float:dX, float:dY, float:dZ,, way[32];
GetPlayerPos(playerid, dX, dY, dZ);
format(way,32,"SL577/%s.cfg",Name);

dini_FloatSet(way,"Pos_X", dX);
dini_FloatSet(way,"Pos_Y", dY);
dini_FloatSet(way,"Pos_Z", dZ);

//A do OnPlayerConnect
new way[32];
format(way,32,"SL577/%s.cfg",Name);
SetPlayerPos(playerid, dini_Float(way,"Pos_X"), dini_Float(way,"Pos_Y"), dini_Float(way,"Pos_Z"));



Ale nejdříve se koukni jestli to tam už nemáš ;)

Sorry přepsal jsem se. Dej to do OnPlayerSpawn. Ale máš to tam 5094 řádek...

Prosim tě, kde jsi to stáhl teď to porovnávám s originálním od LYRIcSE a OnPlayerDisconnect se dost liší :d

Link to comment
Share on other sites

  • 0

aj to odstranil ... pockaj vymenujem ti vsetko co tam je pridane alebo odstranene ...

Odstranene :
car slots .. (house)
notebook
Fuel
GPS

Pridane
domy
fix (/park)
ze si hraci moze zmenit interier vo vlastnem dome

Link to comment
Share on other sites

  • 0

Zkoušel jsem různý postupy ukládání i jsem si do jednotlivých postupů přidal printf a všechny fungovali, ale beztak se do souboru uloží Pos_X = 0.000, Pos_Y = 0.000 a Pos_Z = 0.000. Nevím čím to je, všechno ukládání proběhne, ale do souboru se uloží nulový hodnoty. Nechápu to, jako by je něco nulovalo.. :(

Link to comment
Share on other sites

  • 0

uz asi viem kde je chyba ... len toto mi nejde skompilovat

 

public OnPlayerDisconnect(playerid, reason)
{
	if(!IsPlayerNPC(playerid))
	{
		new Name[24];
		GetPlayerName(playerid,Name,24);
		new disconnect_message[128];

		switch(reason)
		{
	        case 0: format(disconnect_message, 128, "**  Hráč %s (%d) opustil server ! (Pád hry)", Name, playerid);
	        case 1: format(disconnect_message, 128, "**  Hráč %s (%d) opustil server !", Name, playerid);
	        case 2: format(disconnect_message, 128, "**  Hráč %s (%d) opustil server ! (Kick / Ban)", Name, playerid);
	    }
	    
	    SendClientMessageToAll(COLOR_GRAY, disconnect_message);

		TextDrawHideForPlayer(playerid,TDweb);
		TextDrawHideForPlayer(playerid,TDlogo);
		TextDrawHideForPlayer(playerid,InfoBoxNadpis[playerid]);
		TextDrawHideForPlayer(playerid,InfoBoxText[playerid]);
		TextDrawHideForPlayer(playerid,PrisonTD[playerid]);

		TextDrawDestroy(SpeedMeter_Functions[playerid]);

		CancelDrifting(playerid);
		TotalDriftScore[playerid] = 0;
		TextDrawHideForAll(DrawDriftScore[playerid]);
		TextDrawDestroy(DrawDriftScore[playerid]);
		TextDrawHideForAll(DrawTotalDriftScore[playerid]);
		TextDrawDestroy(DrawTotalDriftScore[playerid]);

		TextDrawDestroy(InfoBoxNadpis[playerid]);
		TextDrawDestroy(InfoBoxText[playerid]);
		TextDrawDestroy(PrisonTD[playerid]);

		DisablePlayerCheckpoint(playerid);
		DisablePlayerRaceCheckpoint(playerid);
		
		for(new s=0; s<5; s++)
		{
		    if(PlayerVehicle_State[s][playerid] == true)
		    {
			    if(PlayerVehicleNeons[s][playerid] == true)
				{
					PlayerVehicleNeons[s][playerid] = false;
					DestroyObject(PlayerVehicleNeon1[s][playerid]);
					DestroyObject(PlayerVehicleNeon2[s][playerid]);
				}

			    PlayerVehicle_State[s][playerid]=false;
			    
			    DestroyVehicleEx(PlayerVehicle[s][playerid]);
		    }
		}

		if(Player[playerid][RobTime] > 0) KillTimer(Player[playerid][RobTimer]);
		
		UsePlayerStoppingAnimation[playerid]=false;

		if(Mobil[playerid][PlayingRingtone] == true)
		{
		    PlayerPlaySound(playerid, NO_SOUND, 0,0,0);
		    Mobil[playerid][PlayingRingtone]=false;
		    KillTimer(Mobil[playerid][RingtoneTimer]);
		}

        Server[ConP] = -1;
		for(new p=0; p<MAX_PLAYERS_EX; p++)
		{
			if(IsPlayerConnected(p))
			{
			    if(p > Server[ConP]) Server[ConP] = p;
			}
		}

		DestroyPlayerObjects(playerid,100,MAX_PLAYER_CREATED_OBJECTS); //takmer vsetky

		if(Player[playerid][VK_bool]==true) KillTimer(Player[playerid][VK_timer]);

		for(new p=0; p<MAX_PROPERTY; p++)
		{
		    if(Property[p][MajitelID] == playerid)
			{
				Player[playerid][Bank] += Property[p][Price];
				Property[p][MajitelID] = 9999;
			}
		}

		if(Player[playerid][Specate]==true)
		{
			Player[playerid][Specate]=false;
	    	TogglePlayerSpectating(playerid,0);
	    	PlayerCameraBack(playerid);
	    	TogglePlayerControllable(playerid,1);
		}

		if(Locator[playerid][State]==true) KillTimer(UpdateExTimer[playerid]);

		if(Player[playerid][Team]==100) Player[playerid][Team]=0;

		if(Player[playerid][AFK]==true)
		{
			Delete3DTextLabel(Text_AFK[playerid]);
			Player[playerid][AFK]=false;
		}

		if(Player[playerid][DM_Player]!=9999 && DM[State]==2)
		{
		    Player[playerid][DM_Player]=9999;
		    DM[Players]--;

		    if(DM[Players]==1)
			{
		        for(new i=0; i<=Server[ConP]; i++)
				{
		            if(IsPlayerConnected(i))
					{
					    if(!IsPlayerNPC(i))
			   			{
			                if(Player[i][DM_Player]!=9999)
							{
			                    Player[i][DM_Player]=9999;
			                    new msg[128], Name2[24];
			                    GetPlayerName(i,Name2,24);
			                    format(msg,128,"Hrac %s (%d) vyhral Death Match a vyhral %d$ !",Name2,i,DM[Reward]);
			                    SendClientMessageToAll(COLOR_GREEN,msg);
			                    GameTextForAll(msg,6000,5);
			                    new msgx2[128];
				                format(msgx2,128,"Vyhral si %d$ v DeathMatchi, peniaze boli automaticky uložene do banky",DM[Reward]);
				                SendClientMessage(i,COLOR_YELLOW,msgx2);
				                Player[i][Bank]+=DM[Reward];
				                DM[Reward]=0;
			                    SpawnPlayer(i);
			                    DM_End();
							}
						}
		            }
		        }
		    }
		}

		new way[32];
		new Float:posX, Float:posY, Float:posZ;
		GetPlayerPos(playerid,posX,posY,posZ);
		format(way,32,"SL/%s.cfg",Name);
		new Float:hp, Float:armour;
		GetPlayerHealth(playerid,hp);
		GetPlayerArmour(playerid,armour);

		if(Player[playerid][Logged]==true)
		{
			dini_IntSet(way,"AdminLevel", Player[playerid][AdminLevel]);
			dini_IntSet(way,"Bank", Player[playerid][Bank]);
			dini_IntSet(way,"WantedLevel", GetPlayerWantedLevel(playerid));
			dini_IntSet(way,"Reward", Player[playerid][Reward]);
			dini_IntSet(way,"Kills", Player[playerid][Kills]);
			dini_IntSet(way,"Deaths", Player[playerid][Deaths]);
			dini_IntSet(way,"House", Player[playerid][HouseP]);
			dini_IntSet(way,"Team", Player[playerid][Team]);
			dini_IntSet(way,"Vodicak", Player[playerid][Vodicak]);
			dini_IntSet(way,"Zbrojak", Player[playerid][Zbrojak]);
			dini_FloatSet(way,"Pos_X", posX);
			dini_FloatSet(way,"Pos_Y", posY);
			dini_FloatSet(way,"Pos_Z", posZ);
			dini_IntSet(way,"World", GetPlayerVirtualWorld(playerid));
			dini_IntSet(way,"Interior", GetPlayerInterior(playerid));
			dini_IntSet(way,"LastMoney", Player[playerid][Money]);
			dini_FloatSet(way,"LastHP", hp);
			dini_FloatSet(way,"LastArmour", armour);
			dini_IntSet(way,"LastSkin", GetPlayerSkin(playerid));
			dini_IntSet(way,"Hours", Player[playerid][Hours]);
			dini_IntSet(way,"Minutes", Player[playerid][Minutes]);
			dini_FloatSet(way,"Skill", Player[playerid][Skill]);
			dini_IntSet(way,"Firm", Player[playerid][FirmP]);
			dini_IntSet(way,"Clan", Player[playerid][ClanP]);
			dini_IntSet(way,"ClanRank", Player[playerid][ClanRank]);
			dini_IntSet(way,"Bagety", Player[playerid][Bagety]);
			dini_IntSet(way,"Sprunk", Player[playerid][Sprunk]);
			dini_IntSet(way,"Pivo", Player[playerid][Pivo]);
			dini_IntSet(way,"Vino", Player[playerid][Vino]);
			dini_IntSet(way,"Whisky", Player[playerid][Whisky]);
			dini_IntSet(way,"Marihuana", Player[playerid][Marihuana]);
			dini_IntSet(way,"Jointy", Player[playerid][Jointy]);
			dini_IntSet(way,"Cigarety", Player[playerid][Cigarety]);
			dini_IntSet(way,"Svetlica", Player[playerid][Svetlica]);
			dini_IntSet(way,"Dynamit", Player[playerid][Dynamit]);
			dini_IntSet(way,"Mina", Player[playerid][Mina]);
			dini_IntSet(way,"Raptor", Player[playerid][Raptor]);
			dini_IntSet(way,"Predator", Player[playerid][Predator]);
			dini_FloatSet(way,"Respect", Player[playerid][Respect]);
			dini_IntSet(way,"FightingS", Player[playerid][FightingStyle]);
			}
		}
		for(new c=0; c<100; c++)
		{
			RemovePlayerMapIcon(playerid,c);
		}
	}
	return 1;
}

pise toto "C:\Users\Erik\Documents\GTA San Andreas User Files\pawno\SL577.pwn(4829) : error 010: invalid function or declaration"
toto je ten 4829. riadok "    return 1;"

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...