Still problem.. UNsloved - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Still problem.. UNsloved (
/showthread.php?tid=165442)
Still problem.. UNsloved -
GaGlets(R) - 04.08.2010
pawn Код:
if(strcmp(cmd, "/view", true) == 0)
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(HouseInfo[i][hOwned] >= 1) return SendClientMessage(playerid,COLOR_GREY,"This house is owned");
if(PlayerInfo[playerid][pMoneyH] >= HouseInfo[i][hValue])
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~r~/exit at any time", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else return SendClientMessage(playerid,COLOR_GREY,"You dont have enough cash with you");
}
else return SendClientMessage(playerid,COLOR_GREY,"You are not at house.. ");
}
return 1;
}
Command al lthe time is showing that im not at house....
Tried with ZCMD/DCMD And This.. showing the same..
Help me
Re: Still problem.. UNsloved -
Kar - 04.08.2010
pawn Код:
if(strcmp(cmd, "/view", true) == 0)
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (!IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(HouseInfo[i][hOwned] >= 1) return SendClientMessage(playerid,COLOR_GREY,"This house is owned");
if(PlayerInfo[playerid][pMoneyH] >= HouseInfo[i][hValue])
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~r~/exit at any time", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else return SendClientMessage(playerid,COLOR_GREY,"You dont have enough cash with you");
}
else return SendClientMessage(playerid,COLOR_GREY,"You are not at house.. ");
}
return 1;
}
stupidest idea today ^^ but LOL
Re: Still problem.. UNsloved -
GaGlets(R) - 04.08.2010
I Said all the time even if im not at house i tried it.. but yeah lol will try..
Oh no..
I have /enter command with the same code, ant that is working.. :S
Re: Still problem.. UNsloved -
Kar - 04.08.2010
show me ur enter cmd
Re: Still problem.. UNsloved -
Jefff - 04.08.2010
pawn Код:
stock InDaHouse(playerid)
{
for(new i; i < sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
return i;
}
}
return -1;
}
if(strcmp(cmd, "/view", true) == 0)
{
new HouseID = InDaHouse(playerid);
if(HouseID == (-1)) return SendClientMessage(playerid,COLOR_GREY,"You are not at house.. ");
if(HouseInfo[HouseID][hOwned] >= 1) return SendClientMessage(playerid,COLOR_GREY,"This house is owned");
if(PlayerInfo[playerid][pMoneyH] >= HouseInfo[HouseID][hValue])
{
SetPlayerInterior(playerid,HouseInfo[HouseID][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[HouseID][hWorld]);
SetPlayerPos(playerid,HouseInfo[HouseID][hExitx],HouseInfo[HouseID][hExity],HouseInfo[HouseID][hExitz]);
GameTextForPlayer(playerid, "~r~/exit at any time", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[HouseID][hInt];
PlayerInfo[playerid][pLocal] = HouseID;
HouseEntered[playerid] = HouseID;
}else SendClientMessage(playerid,COLOR_GREY,"You dont have enough cash with you");
return 1;
}