[Pomoc] Spawn problem

Započeo BIRSAâ„¢, April 07, 2012, 20:40:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 5 gostiju pregledaju ovu temu.

Skripta koju koristim:CM
Detaljan opis problema: Nije neki veliki problem ali me nervira, kakod a rijesim ovo kad npr idem relog sa servera, spawna me na mjestu di sam zadnji put bio.
Npr budem kod Alhambbre pa izadjem sa servera, udjem opet i tu me spawn :S

Dio Skripte: Recite da stavim...

Citat: ...:Armando:... poslato April 07, 2012, 20:40:15 POSLE PODNE
Skripta koju koristim:CM
Detaljan opis problema: Nije neki veliki problem ali me nervira, kakod a rijesim ovo kad npr idem relog sa servera, spawna me na mjestu di sam zadnji put bio.
Npr budem kod Alhambbre pa izadjem sa servera, udjem opet i tu me spawn :S

Dio Skripte: Recite da stavim...

Daj nam OnPlayerSpawn

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new nombre[30];
GetPlayerName(playerid, nombre, sizeof(nombre));
if(!strcmp(nombre, "Ime_Prezime", true))
{
SetPlayerSkin(playerid,280);
return 1;
}
ShowPlayerMarkers(0); 
return 1;
}
    TextDrawShowForPlayer(playerid, RandomOtacon);
	TextDrawShowForPlayer(playerid, BalanceTextDraw[playerid]);
	RecentlyShot[playerid] = 0;
	/*TextDrawShowForPlayer(playerid, Mapa0);
	TextDrawShowForPlayer(playerid, Mapa1);*/
    TextDrawShowForPlayer(playerid,Text:QRPV4);
	TextDrawHideForPlayer(playerid, Textdraw3);
	new string[128];
	TextDrawShowForPlayer(playerid, STATS[playerid] );
    format(string, sizeof(string), "~w~Level: ~b~%d~n~~w~Exp:~b~ %d/%d~n~~w~Banka: ~g~$~b~%d", PlayerInfo[playerid][pLevel],  PlayerInfo[playerid][pExp], (PlayerInfo[playerid][pLevel]+1)*(levelexp), PlayerInfo[playerid][pAccount]);
    TextDrawSetString(STATS[playerid], string);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,1);
    GangZoneShowForPlayer(playerid, TH, 1445735634);
    GangZoneShowForPlayer(playerid, Ballaz, -8323129);
    GangZoneShowForPlayer(playerid, Barzini, 199);
    GangZoneShowForPlayer(playerid, Cartel , -16777017);
    GangZoneShowForPlayer(playerid, Groove, 16711888);
    GangZoneShowForPlayer(playerid, Triadas, 1445735634);
    GangZoneShowForPlayer(playerid, Italiana, -8388424);
    GangZoneShowForPlayer(playerid, Lk, -65332);
    GangZoneShowForPlayer(playerid, FARC, 0x40808096);
    GangZoneShowForPlayer(playerid, Surenos, 0x0080FF96);
    GangZoneShowForPlayer(playerid, EPSI, 0x80808096);
    GangZoneShowForPlayer(playerid, Yakuza, -66);
    GangZoneShowForPlayer(playerid, FamilyHurtado, 0xD21B06E5);
	ConBandana[playerid] = 0;
    RemovePlayerAttachedObject(playerid, SlotObjeto);
    TextDrawShowForPlayer(playerid, boxgp);
	TextDrawShowForPlayer(playerid, estadisticast);
	TextDrawShowForPlayer(playerid, boxrojoe);
	PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);

	InitLockDoors(playerid);
	STDPlayer[playerid] = 0;
	SetPlayerHealth(playerid, 50);
	gTeam[playerid] = PlayerInfo[playerid][pTeam];
	if (gTeam[playerid] == 4)
	{
		gTeam[playerid] = 3;
	}
	if(gPlayerLogged[playerid] == 0)
	{
    	SendClientMessage(playerid, COLOR_LIGHTRED, "** Logiraj se prije no sto stisnes SHIFT, Kickan si..**");
        KickPlayer[playerid] = 1;
 	}
	if(gTeam[playerid] == 3)
	{
	    if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
	    {
			SendClientMessage(playerid, COLOR_LIGHTRED, "Izvinjavamo se, nisi clan nijedne bande/organizacije, Civil si!");
			MedicBill[playerid] = 0;
			new model = PlayerInfo[playerid][pChar];
			if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 30) { SetSpawnInfo(playerid, 30, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 30; gTeam[playerid] = 30; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 31) { SetSpawnInfo(playerid, 31, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 31; gTeam[playerid] = 31; PlayerInfo[playerid][pModel] = model; }
			else if(PlayerInfo[playerid][pMember] == 32) { SetSpawnInfo(playerid, 32, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 31; gTeam[playerid] = 31; PlayerInfo[playerid][pModel] = model; }
			SpawnPlayer(playerid);
		}
	}
	if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
	else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
	SetPlayerWeapons(playerid);
	SetPlayerSpawn(playerid);
	SetPlayerToTeamColor(playerid);
	PlayerFixRadio(playerid);
	for(new i = 0; i < sizeof(Turfs); i++)
	{
	    GangZoneShowForPlayer(playerid, i, TurfInfo[i][zColor]);
        return 1;
	}

	if(MapIconsShown[playerid] != 1)
	{
	    MapIconsShown[playerid] = 1;
	    for(new i = 0; i < sizeof(BizzInfo); i++)
		{
			SetPlayerMapIcon(playerid,i + 1,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ],36,COLOR_LIGHTRED);
		}
		for(new i = 0; i < sizeof(SBizzInfo); i++)
		{
		    SetPlayerMapIcon(playerid,i + 20,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ],36,COLOR_LIGHTRED);
		}
	}
	return 1;
}


Eto

Kad odeÅ¡ relog i vrati te na to mjesto jel ti piÅ¡e kakav text? Npr. "Vracen si gdje si bio"?Ako piÅ¡e naÄ'i taj text u GM-u i obriÅ¡i ga tj. sve vezano za njega.

Citat: Dane poslato April 07, 2012, 20:49:41 POSLE PODNE
Kad odeÅ¡ relog i vrati te na to mjesto jel ti piÅ¡e kakav text? Npr. "Vracen si gdje si bio"?Ako piÅ¡e naÄ'i taj text u GM-u i obriÅ¡i ga tj. sve vezano za njega.

Ne pise nista....

Daj SetPlayerSpawn() funkciju.

Last nick: Paradox


Makni onda ovo :
                if(PlayerInfo[playerid][pCrashed] == 1)
                {
                    if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
                    {
                        SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
                        SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
                        SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
                        SendClientMessage(playerid, COLOR_WHITE, "Vraca te se gdje ste bili prije crasha..");
                        GameTextForPlayer(playerid, "~p~Crashiro si", 5000, 3);
                        return 1;
                        }
                }


Vegas.

Citat: [TG:RP]$--L84S--$ poslato April 07, 2012, 21:17:07 POSLE PODNE
Makni onda ovo :
                if(PlayerInfo[playerid][pCrashed] == 1)
                {
                    if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
                    {
                        SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
                        SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
                        SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
                        SendClientMessage(playerid, COLOR_WHITE, "Vraca te se gdje ste bili prije crasha..");
                        GameTextForPlayer(playerid, "~p~Crashiro si", 5000, 3);
                        return 1;
                        }
                }

Ukoliko se ne varam, ovo ima svaki srw, kad dobiješ craš onda te vraća gdje si bio... Msm da nije to problem..

Izbriši ovo:
if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
		    {
		        new plname[MAX_PLAYER_NAME];
		        GetPlayerName(playerid, plname, sizeof(plname));
      			SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
	        	SafeSetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
	    		SafeSetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
		    	return 1;
			}

Last nick: Paradox