help with /enter command
#1

if(strcmp(cmdtext, "/enter", true) == 0)
{
if(PlayerInfo[playerid][pMember] >= 0 || PlayerInfo[playerid][pLeader] >= 0)
{
if PlayerToPoint(5,playerid,-1989.6385,1117.8773,54.468
*then
{
SetPlayerPos(playerid,-2025.0823,1143.2609,18.068;
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_1GREEN,"*** Welcome to Church, The home of God !");
return 1;
}
}
}

how can i make from /enter to ENTER BUTTON ?? help plz
Reply
#2

http://forum.sa-mp.com/index.php?topic=169841.0
Reply
#3

Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
  if(newkeys & KEY_ACTION) OnPlayerCommandText(playerid,"/enter");
  return 1;
}
Reply
#4

yeah but i want ENTER button not F
Reply
#5

Quote:
Originally Posted by KennYthegod
yeah but i want ENTER button not F
You can't. You can only use the button player uses for entering vehicles.
Reply
#6

ok but i dont get it how to apply that on this ??

if(strcmp(cmdtext, "/enter", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
{
if PlayerToPoint(5,playerid,2380.1746,-1785.7261,13.5469)
*then
{
SetPlayerPos(playerid,2466.1011,-1698.2186,1013.507;
SetPlayerInterior(playerid,2);
SetPlayerVirtualWorld(playerid,1);
return 1;
}
}
}
Reply
#7

Look at E1edge example, but replace KEY_ACTION with KEY_SECONDARY_ATTACK .
Reply
#8

works ty very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)