19.06.2010, 11:47
Quote:
Originally Posted by watzab
Hello, i got a roleplay server. i want script an HQ, not a buyable house. Just a icon when i press enter it enters the house
Please help me, please tell how i do this, Thank you. ![]() |
First we make a PickUp in the front of the door.
Quote:
CreatePickup(1239, 2, [HQ Door Position], -1); |
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/enter", cmdtext, true, 6) == 0) { if(IsPlayerInRangeOfPoint(playerid, 3.0, [Position]) SetPlayerInterior(playerid, [Interior of the HQ]); SetPlayerPos(playerid, [Player Position in the HQ]); return 1; } return SendClientMessage(playerid, COLOR_GREY, "* There is no door in range to enter."); } |
Quote:
if(strcmp("/exit", cmdtext, true, 6) == 0) { if(IsPlayerInRangeOfPoint(playerid, 3.0, [By the door Inside the HQ position])) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, [Position for in front of the door out of the HQ]); return 1; } return SendClientMessage(playerid, COLOR_GREY, "* There is no door in range to exit."); } |