Jump to content

[REZOLVAT] Intrebare - spawnchange


Ionut09
 Share

Recommended Posts

  • Administrator

Comanda

CMD:spawnchange( playerid, params )
{
	ShowPlayerDialog( playerid, DIALOG_SPAWNCHANGE, DIALOG_STYLE_LIST, "Spawn Change:", "HQ/Spawn\nCasa\nApartament", "Set", "Cancel" );
	return true;
}

Dialog-ul

case DIALOG_SPAWNCHANGE:
{
	if( !response ) return true;

	switch(listitem)
	{
		case 0:
		{
			PlayerInfo[ playerid ][ pSpawnChange ] = 0;
		}

		case 1:
		{
			if( PlayerInfo[ playerid ][ pPhousekey ] == 999 ) return SCM( playerid, -1, "Nu ai o casa." ); 
			PlayerInfo[ playerid ][ pSpawnChange ] = 1;			
		}

		case 2:
		{
			have_apartment( playerid ) == -1 ) return SCM( playerid, -1, "Nu ai un apartament." ); 
			PlayerInfo[ playerid ][ pSpawnChange ] = 2;
		}
	}

	Update( playerid, pSpawnChangex ); 
	SCM( playerid, COLOR_YELLOW, "Ai schimbat spawnul cu succes." );
}

De adaugat la OnPlayerSpawn

	switch( PlayerInfo[ playerid ][ pSpawnChange ] )
	{
		case 0: 
		{
			SetPlayerInterior( playerid, 0 );
			SetPlayerVirtualWorld( playerid, 0 );
			SetPlayerPos( playerid, x, y, z ); // pozitie spawn default
		}

		case 1: 
		{
			SetPlayerInterior( playerid, interiorCasa );
			SetPlayerVirtualWorld( playerid, vwCasa );
			SetPlayerPos( playerid, x, y, z ); // pozitie spawn casa
		}

		case 2: 
		{
			SetPlayerInterior( playerid, interiorApartament );
			SetPlayerVirtualWorld( playerid, vwApartament );			
			SetPlayerPos( playerid, x, y, z ); // pozitie spawn apartament
		}
	}

 

Sper ca ai inteles ce ai de facut.

Link to comment
Share on other sites

Aparent, nu mai am problema aia, nu stiu de ce nu mi s-a incarcat atunci.

1 hour ago, Leonard said:

Ai setat bine virtual world-ul la player ca cel de la apartament? La fel si interiorul?

nu am pus si la onplayerspawn, are ceva? Deoarece eu nu vreau sa pun la x,y,z coordonatele unde sa se spawneze toti, vreau fiecare la casa lui.

Link to comment
Share on other sites

  • Administrator
Acum 27 minute, Ionut09 a spus:

Aparent, nu mai am problema aia, nu stiu de ce nu mi s-a incarcat atunci.

nu am pus si la onplayerspawn, are ceva? Deoarece eu nu vreau sa pun la x,y,z coordonatele unde sa se spawneze toti, vreau fiecare la casa lui.

Normal ca are... X Y Z il iei de la sistemul de case sau bizuri

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...