Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

Nu sunteti conectat. Conectați-vă sau înregistrați-vă

Vezi subiectul anterior Vezi subiectul urmator In jos  Mesaj [Pagina 1 din 1]

#1Kame 

[Tutorial] Cum schimbam spawn-ul de la factiuni EmptySam Mar 19, 2016 8:08 pm

Kame

Pasul I.

Deschizi serverul tau de samp, intrii pe el,mergi la locul unde doreeti sa faci spawnul factiunii si scri /save Factiune X.


Pasul II.


Ieei de pe server,inchide consola si intri 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:
Pawno Code: [Select]
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);
}
}
Bun,La mine spre exemplu, schimb coordonatele urmatoare:

if(PlayerToPointStripped(1, playerid,627.1387,-571.7292,17.9145, cx,cy,cz))
{//PD Entrance
Pasul IV.


Ne uitam in notepad si copiem coordonatele dupa prima virgula pana la cea de a4-a virgula si anume eu am:
AddPlayerClass(250,1245.8932,324.6824,-11.7422,156.4026,0,0,0,0,0,0); // Factiune XSi 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 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!

https://c4strike.forumattivo.it

Vezi subiectul anterior Vezi subiectul urmator Sus  Mesaj [Pagina 1 din 1]

Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum