auto enter & exit on those pickups , help please - 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: auto enter & exit on those pickups , help please (
/showthread.php?tid=641047)
auto enter & exit on those pickups , help please -
BadJih - 10.09.2017
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.
Re: auto enter & exit on those pickups , help please -
AmarPlayer - 10.09.2017
Код:
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.
Re: auto enter & exit on those pickups , help please -
BadJih - 10.09.2017
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
Re: auto enter & exit on those pickups , help please -
AmarPlayer - 10.09.2017
Okay, wait a little bit.
Re: auto enter & exit on those pickups , help please -
AmarPlayer - 10.09.2017
Код:
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;
}
Re: auto enter & exit on those pickups , help please -
BadJih - 10.09.2017
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
Re: auto enter & exit on those pickups , help please -
BadJih - 10.09.2017
Anyone ?
Re: auto enter & exit on those pickups , help please -
BadJih - 10.09.2017
UP! up!
Re: auto enter & exit on those pickups , help please -
silverms - 10.09.2017
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
Re: auto enter & exit on those pickups , help please -
BadJih - 10.09.2017
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 ""