/Enter Bug - 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)
+--- Thread: /Enter Bug (
/showthread.php?tid=313693)
/Enter Bug -
Mac-10 - 27.01.2012
I have fixed this bug before, but not quite sure how to now..it's a basic GodFather based Gamemode and you cannot /enter into businesses, houses or any other places at all. Along with exit..It worked fine before no different change in code..Here is the Code Layout..
pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(2.0, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(HouseInfo[i][hLock] == 0 || GetPVarInt(playerid, "AdminDuty") == 1)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,i+100);
DOO_SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Welcome ~n~~r~Home", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
PlayerInfo2[HouseEntered][playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
}
}
}
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
////printf("House :%d",i);
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(PlayerInfo2[HouseEntered][playerid] == i)
{
SetPlayerVirtualWorld(playerid,HouseInfo[i][hOutWorld]);
SetPlayerInterior(playerid,HouseInfo[i][hOutInt]);
DOO_SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
PlayerInfo2[HouseEntered][playerid] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealthEx(playerid,100.0);
}
}
return 1;
}
}
}
Feedback is Much Appreciated..Thanks.
Re: /Enter Bug -
varuncoolrule - 27.01.2012
Script is not bug maybe your business is bug
Re: /Enter Bug -
Tamao_Serizawa - 27.01.2012
Try put it in [ pawn ][ /pawn ]
Re: /Enter Bug -
Mac-10 - 28.01.2012
There is no Business Bug, Everything worked before, I have fixed this problem before, but not quite sure what the problem is.