AuD_CuLoRi
Mesaje : 121 Inscris In : 2011-03-15
| Subject: [TUTORIAL]Cum sa creezi un HQ. Sat Mar 19, 2011 3:32 pm | |
| In acest tutorial va voi arata cum sa creezi un HQ pentru samp.
Prima data, intri in GM si cauti liniile:
- Code:
-
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:
-
SetPlayerPos(i,x,y,z);
Apoi, sa creeam i-ul pe care se va intra.Cauti linia:
- Code:
-
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:
-
AddStaticPickup(1239, 2, x,y,z); //orice aici
Apoi, cauti liniile:
- Code:
-
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:
-
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:
-
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:
-
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:
-
else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828)) pui asa :
- Code:
-
else if (PlayerToPoint(3.0, playerid,coordonatele din interior))
si in loc de:
- Code:
-
SetPlayerPos(playerid,1481.0566,-1770.9563,18.7958); punem :
- Code:
-
SetPlayerPos(playerid,coordonatele de afara);
Asta a fost, sper ca ati inteles!
| |
|