Salut,dupa cum spune titlul astazi va arat cum sa faceti un hq pt. membrii unei factiuni/pt. toti playerii.
Primul pas:Ne ducem in joc unde vrem sa fie usa hq-ului si dam /save.Pt.a vedea coordonatele ne ducem in My Documents=>Gta San Andreas User Files=>SAMP=>SavedPositions si copiem x,y,z.
Al doilea:Cautam in GameMode(daca e gf cream)functia "public OnPlayerKeyStateChange"
Al treilea pas:Adaugam:
Pt intrare:
Citat:
if (newkeys==KEY_SECONDARY_ATTACK)
{
{
if PlayerToPoint(5,playerid, x,y,z)
*then
{
SetPlayerPos(playerid, x,y,z);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
}
Pt.iesire:
Citat:
if (newkeys==KEY_SECONDARY_ATTACK)
{
{
if PlayerToPoint(5,playerid,x,y,z) interior,coordonata y interior,coordonata z interior
*then
{
SetPlayerPos(playerid, x,y,z);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
}
Al patrulea pas:Creearea propriuzisa a PickUpului de intrare/iesire.
Luam coordonatele de intrare de la pasul intai si adaugam la "public ongamemodeinit":
CreatePickup=(id pickup,23,x,y,z, 0);
Daca vrem pt.membrii unei factiuni adaugam inainte de:
{
Citat:
if PlayerToPoint(5,playerid, x,y,z)
Asta:
Citat:
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
In cazul meu 12=factiunea care poate intra in hq.
Si un model complet facut de catre mine la factiunea FMA pe gm meu:
Citat:
if (newkeys==KEY_SECONDARY_ATTACK)
Citat:
{
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
{
if PlayerToPoint(5,playerid, -2498.4089,315.5296,29.1693)
*then
{
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 3);
return 1;
}
}
}
if (newkeys==KEY_SECONDARY_ATTACK)
{
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
{
if PlayerToPoint(5,playerid,1494.325195,1304.942871,1093.289062)
*then
{
SetPlayerPos(playerid, -2498.4089,315.5296,29.1693);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
}
Va multumesc pentru ca ati citit acest tutorial pana data viitoare va urez Sarbatori Fericite,un an nou minunat si bafta la scriptat.
Primul pas:Ne ducem in joc unde vrem sa fie usa hq-ului si dam /save.Pt.a vedea coordonatele ne ducem in My Documents=>Gta San Andreas User Files=>SAMP=>SavedPositions si copiem x,y,z.
Al doilea:Cautam in GameMode(daca e gf cream)functia "public OnPlayerKeyStateChange"
Al treilea pas:Adaugam:
Pt intrare:
Citat:
if (newkeys==KEY_SECONDARY_ATTACK)
{
{
if PlayerToPoint(5,playerid, x,y,z)
*then
{
SetPlayerPos(playerid, x,y,z);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
}
Pt.iesire:
Citat:
if (newkeys==KEY_SECONDARY_ATTACK)
{
{
if PlayerToPoint(5,playerid,x,y,z) interior,coordonata y interior,coordonata z interior
*then
{
SetPlayerPos(playerid, x,y,z);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
}
Al patrulea pas:Creearea propriuzisa a PickUpului de intrare/iesire.
Luam coordonatele de intrare de la pasul intai si adaugam la "public ongamemodeinit":
CreatePickup=(id pickup,23,x,y,z, 0);
Daca vrem pt.membrii unei factiuni adaugam inainte de:
{
Citat:
if PlayerToPoint(5,playerid, x,y,z)
Asta:
Citat:
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
In cazul meu 12=factiunea care poate intra in hq.
Si un model complet facut de catre mine la factiunea FMA pe gm meu:
Citat:
if (newkeys==KEY_SECONDARY_ATTACK)
Citat:
{
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
{
if PlayerToPoint(5,playerid, -2498.4089,315.5296,29.1693)
*then
{
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 3);
return 1;
}
}
}
if (newkeys==KEY_SECONDARY_ATTACK)
{
if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
{
if PlayerToPoint(5,playerid,1494.325195,1304.942871,1093.289062)
*then
{
SetPlayerPos(playerid, -2498.4089,315.5296,29.1693);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
}
Va multumesc pentru ca ati citit acest tutorial pana data viitoare va urez Sarbatori Fericite,un an nou minunat si bafta la scriptat.