[CAMPANIE STAFF]Cautam moderatori si designeri activi!
Welcome to WTFCS Community Forums!
Servere gaming la super-preturi! [HOSTING SERVICE]
-->






[Tutorial] Cum sa creezi un HQ Members Only
Author : SaTaNa99, Category : Tutoriale, 0 Replyes, 1037 Views
EVALUATE THIS TOPIC
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 Guest(s)
fondator rsp.wtfcs.com
 
421
POSTS
150
THREADS
0
REPUTATION
Male
Sex

WtfCs Coins: -0.01[w]
01-09-2014, 11:26 AM
#1
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:
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:
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:
{
if PlayerToPoint(5,playerid, x,y,z)

Asta:
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:
if (newkeys==KEY_SECONDARY_ATTACK)
{
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;
}
}
}
Regulament forum: You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.


Forum Jump: