Jump to content
  • 0

Problema SetSpawnInfo


TheGodfather

Question

Salut, am la functia onplayerdeath functia setspawninfo, dar nu ma spawneaza la coordonatele respective cand mor. Am incercat sa pun setspawninfo si pe ultima linie din functie onplayerdeath, tot nu merge.

public OnPlayerDeath(playerid, killerid, reason) {

      SetSpawnInfo(playerid, NO_TEAM, 306, 1286.0758, -1329.2727, 13.4611, 269.15, -1, -1, -1, -1, -1, -1);

      return 1;

}

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
17 minutes ago, MiritaXD said:

SetSpawnInfo(playerid, NO_TEAM, 306, 1286.0758, -1329.2727, 13.4611, 269.15, -1, -1, -1, -1, -1, -1); // O adaugi la OnPlayerRequestClass

public OnPlayerRequestClass(playerid, classid) {
    if(IsPlayerLogged[playerid] == 1) SpawnPlayer(playerid);
    SetSpawnInfo(playerid, NO_TEAM, 306, 1286.0758, -1329.2727, 13.4611, 269.15, -1, -1, -1, -1, -1, -1);
    return true;
}

Nu merge

Link to comment
Share on other sites

  • 0

faci o variabila si verifici daca a murit sau nu

 

faci ceva de genu

 

new amurit[MAX_PLAYERS];

OnPlayerDeath(playerid)
{
	amurit[playerid] = 1; //aici seteaza ca jucatorul a murit
}

OnPlayerSpawn(playerid)
{
	if(amurit[playerid]) 
	{
		///setezi spawnu
		amurit[playerid] = 0; //aici o resetezi in caz ca nu primeste kill sa0ti de spawn la locul normal
		return 1;
	}
}

spre sa te ajute cu ceva, n-am testat sau ceva

Link to comment
Share on other sites

  • 0
13 minutes ago, MiritaXD said:

faci o variabila si verifici daca a murit sau nu

 

faci ceva de genu

 

new amurit[MAX_PLAYERS];

OnPlayerDeath(playerid)
{
	amurit[playerid] = 1; //aici seteaza ca jucatorul a murit
}

OnPlayerSpawn(playerid)
{
	if(amurit[playerid]) 
	{
		///setezi spawnu
		amurit[playerid] = 0; //aici o resetezi in caz ca nu primeste kill sa0ti de spawn la locul normal
		return 1;
	}
}

spre sa te ajute cu ceva, n-am testat sau ceva

Am incercat si asa, tot nu merge. E gm hpq123 bhood, daca te ajuta.

Link to comment
Share on other sites

  • 0

Te poate sfătui @HPQ123 când are timp,  in câțiva pași. Ia legătura cu el. 

                     

  Serverul meu de Discord: Click aici       a7DfKP7.gif                                                                      FGIfknL.gif

k35T5Nb.png                                                                                                                                                                                                                                                                                                I0aS856.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.