Page 1 of 1

Cum sa creezi un HQ.

Posted: Mon Oct 24, 2011 6:01 am
by RoberTo
In acest tutorial va voi arata cum sa creezi un HQ pentru samp.

Prima data, intri in GM si cauti liniile:

Code: Select all

						if(house == 241)//City Hall
						{
						    SetPlayerInterior(i,0);
						    SetPlayerPos(i,1481.0566,-1770.9563,18.7958);
						    PlayerInfo[i][pInt] = 0;
						    PlayerInfo[i][pLocal] = 255;
						}
Dublezii liniile si in loc de "//City Hall" pui ce vrei tu, iar la SetPlayerPos pui asa:

Code: Select all

SetPlayerPos(i,x,y,z);
Apoi, sa creeam i-ul pe care se va intra.Cauti linia:

Code: Select all

AddStaticPickup(1239, 2, 1481.0566,-1770.9563,18.7958); //City Hall
o dublezi, si in loc de "//City Hall" (fara ghilimele) pui ce vrei tu si vei avea asta:

Code: Select all

AddStaticPickup(1239, 2, x,y,z); //orice aici
Apoi, cauti liniile:

Code: Select all

if (PlayerToPoint(3.0, playerid,1481.0566,-1770.9563,18.7958))
			{
			    SetPlayerInterior(playerid,id-ul interiorului (oricare vrei tu) );
				SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
				GameTextForPlayer(playerid, "~w~Welcome to the City Hall", 5000, 1);
				PlayerInfo[playerid][pInt] = id-ul interiorului(oricare vrei tu);
				PlayerInfo[playerid][pLocal] = 241;
			}
Le dublezi si in loc de

Code: Select all

if (PlayerToPoint(3.0, playerid,1481.0566,-1770.9563,18.7958))
pui coordonatele tale.

Apoi, la setplayerinterior pui id-ul interiorului tau (este aici) ori in joc scri /interior si /save pentru a afla coordonatele si interiorul.Apoi modifici playerinfo[playerid][pInt] = 3; cu interior id-ului si in loc de welcome to city hall pui orice.

Acum, sa facem si gametext-ul.Cauti liniile:

Code: Select all

else if (PlayerToPoint(3, i,1481.0566,-1770.9563,18.7958))
			{
			    GameTextForPlayer(i, "~y~Welcome to the ~r~City Hall~n~~w~Type /enter to go in", 5000, 5);
			}
Le dublezi si in loc de PlayerToPoint pui asa PlayerToPoint(3, i, coordonatele tale)) si restul.

Acum, sa facem comanda de iesit.Cauti comanda "/exit" cu ghilimele, dai mai jos si gasesti asta:

Code: Select all

else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
			{
			    SetPlayerInterior(playerid,0);
				SetPlayerPos(playerid,1481.0566,-1770.9563,18.7958);
				PlayerInfo[playerid][pInt] = 0;
				PlayerInfo[playerid][pLocal] = 255;
			}
In loc de:

Code: Select all

else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
pui asa

Code: Select all

else if (PlayerToPoint(3.0, playerid,coordonatele din interior))
si in loc de:

Code: Select all

SetPlayerPos(playerid,1481.0566,-1770.9563,18.7958);
pui:

Code: Select all

SetPlayerPos(playerid,coordonatele de afara);
Asta a fost, sper ca ati inteles, postati aici probleme/erori. :)