auto enter & exit on those pickups , help please
#1

there's a lot of pickups ... so i cant do it all i want you to do this for me please ( if(newkeys & KEY_YES) = /enter ) if(newkeys & KEY_NO) = /exit ) please if u did it i will be thanksfull for you +REP


edited.
Reply
#2

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
     if(pickupid == the name of the pickup you created)
     {
          SetPlayerPos(playerid, coordinates to enter the place);
     }
     return 1;
}
I don't have time currently to make the script using y and n.
Reply
#3

Quote:
Originally Posted by AmarPlayer
Посмотреть сообщение
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
     if(pickupid == the name of the pickup you created)
     {
          SetPlayerPos(playerid, coordinates to enter the place);
     }
     return 1;
}
no no it's setted so i want to add auto enter and exit to the /enter & /Exit you know... bad english sorry
Reply
#4

Okay, wait a little bit.
Reply
#5

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_YES)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0, coordinates of the pickup))
		{
			SetPlayerPos(playerid, coordinates of the place to you want the player to enter);
		}
	}

	//Now you have to find the exit coordinates

	if(newkeys & KEY_NO)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0, coordinates of the exit place))
		{
			SetPlayerPos(playerid, coordinates of the pickup again);
		}
	}
	return 1;
}
Reply
#6

Quote:
Originally Posted by AmarPlayer
Посмотреть сообщение
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_YES)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0, coordinates of the pickup))
		{
			SetPlayerPos(playerid, coordinates of the place to you want the player to enter);
		}
	}

	//Now you have to find the exit coordinates

	if(newkeys & KEY_NO)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0, coordinates of the exit place))
		{
			SetPlayerPos(playerid, coordinates of the pickup again);
		}
	}
	return 1;
}
listen this one didnt helped me because there's a lot of pickups ... so i cant do it all i want you to do this for me please ( if(newkeys & KEY_YES) = /enter ) if(newkeys & KEY_NO) = /exit ) please if u did it i will be thanksfull for you +REP u
Reply
#7

Anyone ?
Reply
#8

UP! up!
Reply
#9

ik how to make it
so when u do /enter u will be taken to an another interior to the way I worked it out on my server is
PHP код:
if(PRESSED(KEY_NO)) {
        if(
GetPlayerInterior(playerid) != 0) {
            
cmd_exit(playerid"");
        }
        else {
            
cmd_enter(playerid"");
        }
    } 
this required zcmd
Reply
#10

Quote:
Originally Posted by silverms
Посмотреть сообщение
ik how to make it
so when u do /enter u will be taken to an another interior to the way I worked it out on my server is
PHP код:
if(PRESSED(KEY_NO)) {
        if(
GetPlayerInterior(playerid) != 0) {
            
cmd_exit(playerid"");
        }
        else {
            
cmd_enter(playerid"");
        }
    } 
this required zcmd
what to do inside ""
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)