[PROBLEM]/enter command - 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: [PROBLEM]/enter command (
/showthread.php?tid=405457)
[PROBLEM]/enter command -
erorche - 06.01.2013
I have a House System and isn't working /enter command, when y type /enter like the cmd isn't existence.
pawn Код:
f(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (IsPlayerInRangeOfPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SafeSetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SafeSetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Dobrodosao kuci", 5000, 1);
PlayerInfo[playerid][pLocal] = i;
PlayerInfo[playerid][pVirWorld] = HouseInfo[i][hWorld];
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
HouseEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
return 1;
}
}
}
Re: [PROBLEM]/enter command -
nilanjay - 06.01.2013
pawn Код:
if (IsPlayerInRangeOfPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))// why do you have a 3 there?
Re: [PROBLEM]/enter command -
erorche - 06.01.2013
xyz ?
Re: [PROBLEM]/enter command -
nilanjay - 06.01.2013
Check the function:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Re: [PROBLEM]/enter command -
JM_Millers - 06.01.2013
USE:
PHP код:
if (IsPlayerInRangeOfPoint(playerid, 3.0,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))