Jump to content

Cum schimbam spaw-nul de la factiuni!


Джо

Recommended Posts

Salut?ri SA-MP România!La cererea lui TURCW2012 am decis s? fac un tutorial ?i anume Cum s? schimbi un spawn al unei fac?iuni.Ei bine foarte simplu, spun eu,deci s? începem!

Salut?ri SA-MP România!La cererea lui TURCW2012 am decis s? fac un tutorial ?i anume Cum s? schimbi un spawn al unei fac?iuni.Ei bine foarte simplu, spun eu,deci s? începem!

Pasul I.

Deschizi serverul t?u de samp, intrii pe el,mergi la locul unde dore?ti s? faci spawnul fac?iunii ?i scri /save Fac?iune X.

Pasul II.

Ie?i de pe server,inchide consola si intr? in My Documents>>Gta San Andreas User Filles>>SAMP.Acolo in acel folder aveti savedPositions ,il deschideti cu notepad si va aparea cam asa:

AddPlayerClass(250,1245.8932,324.6824,-11.7422,156.4026,0,0,0,0,0,0); // Factiune X(X-factiunea spre exemplu LSPD).
Pasul III. Lasi in bara acel notepad,dupa care mergi in gamemode-ul tau si cautati public CheckForWalkingTeleport(playerid) O sa va apara ceva de genul: [pawn]public CheckForWalkingTeleport(playerid) { new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); if(PlayerToPointStripped(1, playerid,627.1387,-571.7292,17.9145, cx,cy,cz)) {//PD Entrance GameTextForPlayer(playerid, "~w~Departamentul de Politie", 5000, 1); SetPlayerInterior(playerid, 6); SetPlayerPos(playerid,246.7079,66.2239,1003.6406); PlayerInfo[playerid][pInt] = 6; } else if(PlayerToPointStripped(1, playerid,246.5325,62.4251,1003.6406, cx,cy,cz)) {//PD Exit GameTextForPlayer(playerid, "~w~Dillimore", 5000, 1); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,631.1877,-571.5837,16.3359); PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2304.4897,14.2307,26.4844, cx,cy,cz)) {//Haine Entrance GameTextForPlayer(playerid, "~w~Magazin de Haine", 5000, 1); SetPlayerInterior(playerid, 14); SetPlayerPos(playerid,204.1172,-165.3715,1000.5234); PlayerInfo[playerid][pInt] = 14; } else if(PlayerToPointStripped(1, playerid,204.4357,-167.8324,1000.5234, cx,cy,cz)) {//Haine Exit GameTextForPlayer(playerid, "~w~Palamino Creek", 5000, 1); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2301.5715,14.1902,26.4844); PlayerInfo[playerid][pInt] = 0; } else if(PlayerToPointStripped(1, playerid,2276.3716,-83.2611,26.7362, cx,cy,cz)) {//Pompieri Entrance GameTextForPlayer(playerid, "~w~Departamentul de Pompieri", 5000, 1); SetPlayerInterior(playerid, 3); SetPlayerPos(playerid,386.0728,170.5698,1008.3828); PlayerInfo[playerid][pInt] = 3; SetPlayerVirtualWorld(playerid, 1); } else if(PlayerToPointStripped(1, playerid,1222.4402,243.9825,19.5469, cx,cy,cz)) {//Spital Entrance GameTextForPlayer(playerid, "~w~Spitalul RedCounty", 5000, 1); SetPlayerInterior(playerid, 3); SetPlayerPos(playerid,365.5522,162.2903,1019.9844); PlayerInfo[playerid][pInt] = 3; SetPlayerVirtualWorld(playerid, 2); } else if(PlayerToPointStripped(1, playerid,388.7728,170.8457,1008.3828, cx,cy,cz)) {//Pompieri Exit     if(GetPlayerVirtualWorld(playerid) == 1) { GameTextForPlayer(playerid, "~w~Palamino Creek", 5000, 1); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2276.3328,-86.2112,26.5012); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); } } else if(PlayerToPointStripped(1, playerid,367.9037,162.3406,1019.9844, cx,cy,cz)) {//Spital Exit     if(GetPlayerVirtualWorld(playerid) == 2) { GameTextForPlayer(playerid, "~w~MontGomery", 5000, 1); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1224.9930,246.6261,19.5469); PlayerInfo[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); } } ETC...[/pawn] Bun,La mine spre exemplu, schimb coordonatele urmatoare:
if(PlayerToPointStripped(1, playerid,[u]627.1387,-571.7292,17.9145,[/u] cx,cy,cz))
	{//PD Entrance
Pasul IV. Ne uitam in notepad si copiem coordonatele dupa prima virgula pana la cea de a IV virgula si anume eu am:
AddPlayerClass(250,1245.8932,324.6824,-11.7422,156.4026,0,0,0,0,0,0); // Factiune X
Si voi copia: 1245.8932,324.6824,-11.7422 Ne intoarcem la GM si schimbam si de acolo exemplul meu:
if(PlayerToPointStripped(1, playerid,1245.8932,324.6824,-11.7422, cx,cy,cz))
	{//PD Entrance
ATENTIE!Trebuie sa schimbati si dupa else if daca doriti sa mearga acolo unde a-ti dat /save in joc.
else if(PlayerToPointStripped(1, playerid,1245.8932,324.6824,-11.7422, cx,cy,cz))
	{//PD Exit

Sper ca am fost cat mai explicit pentru incepatori,va multumesc pentru atentie!

 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 months later...

Join the conversation

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

Guest
Reply to this topic...

×   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.