SA-MP Forums Archive
[Help]GarHouse - 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: [Help]GarHouse (/showthread.php?tid=519164)



[Help]GarHouse - PowerF - 13.06.2014

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!


Re: [Help]GarHouse - Laure - 13.06.2014

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;
}



Re: [Help]GarHouse - PowerF - 13.06.2014

Not Work. :/


Re: [Help]GarHouse - Amrev - 13.06.2014

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;
}



Re: [Help]GarHouse - PowerF - 13.06.2014

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.



Re: [Help]GarHouse - Laure - 13.06.2014

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


Re: [Help]GarHouse - xGamerFx - 13.06.2014

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;
}



Re: [Help]GarHouse - PowerF - 13.06.2014

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 -_-


Re: [Help]GarHouse - PowerF - 13.06.2014

No one can help me? :3


Re: [Help]GarHouse - xGamerFx - 13.06.2014

what error