[Help]GarHouse
#1

in GarHouse System

there are command /gotohouse
but that is just allowed for RCON Admin

How to change allowed for players? :/

Код:
//==============================================================================
// This command is used to teleport to a house.
//==============================================================================
CMD:gotohouse(playerid, params[])
{
	new h;
	if(!IsPlayerAdmin(playerid)) return 1;
	if(sscanf(params, "d", h)) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
	if(!fexist(HouseFile(h))) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HID);
	SetPlayerPosEx(playerid, hInfo[h][SpawnOutX], hInfo[h][SpawnOutY], hInfo[h][SpawnOutZ], hInfo[h][SpawnInterior], hInfo[h][SpawnWorld]);
	ShowInfoBox(playerid, I_TELEPORT_MSG, h);
    return 1;
}
REP+ If you can help me!
Reply
#2

Try this
pawn Код:
CMD:gotohouse(playerid, params[])
{
    new h;
    if(sscanf(params, "d", h)) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
    if(!fexist(HouseFile(h))) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HID);
    SetPlayerPosEx(playerid, hInfo[h][SpawnOutX], hInfo[h][SpawnOutY], hInfo[h][SpawnOutZ], hInfo[h][SpawnInterior], hInfo[h][SpawnWorld]);
    ShowInfoBox(playerid, I_TELEPORT_MSG, h);
    return 1;
}
Reply
#3

Not Work. :/
Reply
#4

pawn Код:
CMD:gotohouse(playerid, params[])
{
    new h;
    if(sscanf(params, "i", h))
       {
        ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
        return 1;
        }
        else
        {
    if(!fexist(HouseFile(h))) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HID);
    SetPlayerPosEx(playerid, hInfo[h][SpawnOutX], hInfo[h][SpawnOutY], hInfo[h][SpawnOutZ], hInfo[h][SpawnInterior], hInfo[h][SpawnWorld]);
    ShowInfoBox(playerid, I_TELEPORT_MSG, h);
        }
        return 1;
}
Reply
#5

seriously?

Код:
D:\asaad\[NBTDM]0.3cR5\Eclipse\filterscripts\GarHouse.pwn(2356) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#6

That wont create a problem also can i see your IsPlayerAdmin? Cause this is going to create you a problem in every admin commands.
Reply
#7

Quote:
Originally Posted by PowerF
Посмотреть сообщение
seriously?

Код:
D:\asaad\[NBTDM]0.3cR5\Eclipse\filterscripts\GarHouse.pwn(2356) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
pawn Код:
CMD:gotohouse(playerid, params[])
{
  new h;
  if(sscanf(params, "i", h))
  {
   ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
   return 1;
  }
  else
  {
   if(!fexist(HouseFile(h))) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HID);
   SetPlayerPosEx(playerid, hInfo[h][SpawnOutX], hInfo[h][SpawnOutY], hInfo[h][SpawnOutZ], hInfo[h][SpawnInterior], hInfo[h][SpawnWorld]);
   ShowInfoBox(playerid, I_TELEPORT_MSG, h);
  }
  return 1;
}
Reply
#8

Quote:
Originally Posted by xGamerFx
Посмотреть сообщение
pawn Код:
CMD:gotohouse(playerid, params[])
{
  new h;
  if(sscanf(params, "i", h))
  {
   ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
   return 1;
  }
  else
  {
   if(!fexist(HouseFile(h))) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_INVALID_HID);
   SetPlayerPosEx(playerid, hInfo[h][SpawnOutX], hInfo[h][SpawnOutY], hInfo[h][SpawnOutZ], hInfo[h][SpawnInterior], hInfo[h][SpawnWorld]);
   ShowInfoBox(playerid, I_TELEPORT_MSG, h);
  }
  return 1;
}
its error -_-
Reply
#9

No one can help me? :3
Reply
#10

what error
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)