Creare HQ

Post Reply
RoberTo
Global Moderator
Global Moderator
Posts: 1380
Joined: Sun Dec 26, 2010 9:31 pm
Jucator SA:MP ?: Da
Nick:: RoberTo
Jucator CS ?: Da
Location: Craiova
Contact:

Creare HQ

Post by RoberTo »

Stiu ca mai este un tutorial, dar acela este cu comanda /enter. Acum va arat cum sa faceti fara comanda.


1. Adaugarea pickupului de intrare.
Intrati aici http://weedarr.wikidot.com/pickups si alegeti un pickup.
Mergeti la public OnGameModeInit() si adaugati:

Code: Select all

AddStaticPickup (id, 2, x,y,z, virtual world)
In cazul nostru avem

Code: Select all

AddStaticPickup(1239, 2, 2770.6973,-1628.4293,12.1775);

2. Teleportarea propriu-zisa (intrare)
Mergeti la

Code: Select all

public CheckForWalkingTeleport(playerid)
Si adaugati

Code: Select all

else if(PlayerToPointStripped(1, playerid,x,y,z, cx,cy,cz)) //unde x,y,z reprezinta coordonatele
	{//Intrare
		GameTextForPlayer(playerid, "~w~Textul vostru", 5000, 1);
		SetPlayerInterior(playerid, int); // interiorul ales
		SetPlayerPos(playerid,x,y,z);//pozitia aleasa
		PlayerInfo[playerid][pInt] = int;//interiorul ales 
	}
Interioarele le gasiti aici http://weedarr.wikidot.com/interior

Acum sa facem iesirea.

Code: Select all

else if(PlayerToPointStripped(1, playerid,x,y,z, cx,cy,cz))
	{//Iesire 
		GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
		SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid,x,y,z); //pozitia pe care o vreti la iesire.
		PlayerInfo[playerid][pInt] = 0;
	}
Asta e tot.
Si un model complet:

Code: Select all

if(PlayerToPointStripped(1, playerid,1554.9537,-1675.6584,16.1953, cx,cy,cz))
	{//LSPD Entrance
		GameTextForPlayer(playerid, "~w~Police Department", 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))
	{//LSPD Exit
		GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
		SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid,1552.3231,-1674.6780,16.1953);
		PlayerInfo[playerid][pInt] = 0;
	}
Sper ca v-a fost de folos.
Vrei un host de calitate si serios pentru serverul tau?
VEZI SERVERE HOSTATE LA NOI : http://www.zonek.ro/index.php?option=com_lgsl&Itemid=5
0763.55.9997 Comanda ACUMA OFERTA LIMITATA
Y: zonek_telecom | http://www.zonek.ro
- Nu te baga in pat nervos, stai treaz si "lupta". http://forum.zonek.ro inscrie-te si vezi cum se manifesta...
- Pentru schimb de Linkuri Intra AICi : linkex
Image
- Pentru cereri de Parteneriate prin Bannere Intra AICI
Image
Image
Post Reply

Return to “Tutoriale”