Mod: GTARP
Opis problema: Ovde imam kod kako igrac ulazi i izlazi iz policijske stanice kako da pod if(newkeys & KEY_SECONDARY_ATTACK) ubacim da se na F ulazi i kuce
Kod: if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerConnected(playerid))
{
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
if(IsPlayerConnected(playerid))
{
new playerState = GetPlayerState(playerid);
{
if (playerState == PLAYER_STATE_ONFOOT)
{
if(PlayerToPointStripped(1, playerid,1554.9537,-1675.6584,16.1953, cx,cy,cz))
{//LSPD Entrance
GameTextForPlayer(playerid, "~w~Policijska stanica", 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~Beograd", 5000, 1);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1552.3231,-1674.6780,16.1953);
PlayerInfo[playerid][pInt] = 0;
}
return 1;
}
}
}
}
}
Ako zelis za neki enterier kuce nije to problem, ali ti najverovatnija mislis na igrace da kupuju kuce i to. Za to ti je potreben house system.
Kod:if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[hWorld]);
SetPlayerPos(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]);
GameTextForPlayer(playerid, "~w~Dobrodosli kuci", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
}
}
}
}
}
To mi je za ulazak u kucu. Ja zelim sad da spojim te dve stvari.
jer kad sam ubacio ovu za ulazak u policiju,opstinu itd. na F ulazak u kuce mi ne radi.
Da li neko zna kako to da resim ?
Refresh
Jelm moze neko da mi pomogne?
ne mogu da resim ovaj problem. Zna li neko od vas ?