Enter points?
#1

Hello, can someone please give me e a example how i can make a enterable 24/7 shop?

I got this coords

PHP код:
2424.2573,-1742.7698,13.5461,227.5945 
Thats is a enter point for a 24/7 shop. Please someone give me a example?
Reply
#2

what u want a pickup or something else
Reply
#3

No just simple when you are inrange of that point then you are able to /enter when you inside you're able to /exit
Reply
#4

ok will this work there is a down arrow when player walks on it will be written type/enter if he types enter person will be teleported to 24/7
Reply
#5

i think you must read this
https://sampforum.blast.hk/showthread.php?tid=330001

ok
Reply
#6

Quote:
Originally Posted by Lynet
Посмотреть сообщение
Hello, can someone please give me e a example how i can make a enterable 24/7 shop?

I got this coords

PHP код:
2424.2573,-1742.7698,13.5461,227.5945 
Thats is a enter point for a 24/7 shop. Please someone give me a example?
https://sampforum.blast.hk/showthread.php?tid=330001
Learn from it, there is lots of tutorials of this . Try to search using ****** next time
Reply
#7

I already did, and i made it, but u can /enter every where.
Reply
#8

This is a simple /enter /exit command for 24/7...

Add this above OnGameModeInit
Quote:

stock IsPlayerAtShop(playerid)
{
if (IsPlayerInRangeOfPoint(playerid,10,2424.2573,-1742.7698,13.5461)) return 1;
return 0;
}

stock IsPlayerInShop(playerid)
{
if (IsPlayerInRangeOfPoint(playerid,10,-31.0000000,-91.0000000,1003.2000122)) return 1;
return 0;
}

And this OnPlayerCommandText
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if (!IsPlayerAtShop(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not near a 24/7!");
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, -31.0000000,-91.0000000,1003.2000122);
return 1;
}

if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if (!IsPlayerInShop(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in a 24/7!");
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2424.2573,-1742.7698,13.5461);
return 1;
}
return 0;
}

or with zcmd include( Below #include <a_samp> add #include <zcmd> )... Add this below the stock functions
Quote:

CMD:enter (playerid)
{
if (!IsPlayerAtShop(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not near a 24/7!");
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, -31.0000000,-91.0000000,1003.2000122);
return 1;
}

CMD:exit (playerid)
{
if (!IsPlayerInShop(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in a 24/7!");
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2424.2573,-1742.7698,13.5461);
return 1;
}

Reply
#9

Quote:
Originally Posted by Lynet
Посмотреть сообщение
I already did, and i made it, but u can /enter every where.
IsPlayerInRangeOfPoint
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)