[HELP] PlayerToPoint with HOTKEY is not working.. :/ - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] PlayerToPoint with HOTKEY is not working.. :/ (
/showthread.php?tid=83793)
[HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Moustafa - 27.06.2009
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_ACTION)
{
if (PlayerToPoint(1, playerid, -2038.6663,-87.8214,35.3203))
{
SetPlayerPos(playerid, -2038.6670,-87.1617,35.4203);
return 1;
}
}
return 1;
}
The coord's are right, every thing is right, but when i enter the game, and press the key and it is " ENTER " or " F " it doesnt work.. does anybody know how to make it work? :/
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Moustafa - 27.06.2009
Why noone is answering

is it so hard? just let me know..
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Grim_ - 27.06.2009
The distance in PlayerToPoint of 1 is right on the point. Make sure, 100% that you are right on the spot.
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
illay - 27.06.2009
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if(newkeys == KEY_ACTION && PlayerToPoint(1, playerid, -2038.6663,-87.8214,35.3203)) {
SetPlayerPos(playerid, -2038.6670,-87.1617,35.4203);
return 1;
}
}
return 1;
}
David
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Moustafa - 27.06.2009
And if i want to make another one with the same hotkey and different coord how can i do it?
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Grim_ - 27.06.2009
David yours does the same exact thing as his does already.
Moustafa: Use the code you origionally had, just put differnet coords, like the following:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_ACTION)
{
if (PlayerToPoint(1, playerid, -2038.6663,-87.8214,35.3203))
{
SetPlayerPos(playerid, -2038.6670,-87.1617,35.4203);
return 1;
}
else if(PlayerToPoint(1, playerid, x, y, z))
{
// stuff here
}
}
return 1;
}
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Weirdosport - 27.06.2009
Quote:
Originally Posted by David.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(newkeys == KEY_ACTION && PlayerToPoint(1, playerid, -2038.6663,-87.8214,35.3203)) { SetPlayerPos(playerid, -2038.6670,-87.1617,35.4203); return 1; } } return 1; }
David
|
That will only work if the player is only pressing 1 key.
Re: [HELP] PlayerToPoint with HOTKEY is not working.. :/ -
Mujib - 08.07.2009
Quote:
Originally Posted by Moustafa
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_ACTION) { if (PlayerToPoint(1, playerid, -2038.6663,-87.8214,35.3203)) { SetPlayerPos(playerid, -2038.6670,-87.1617,35.4203); return 1; } } return 1; }
The coord's are right, every thing is right, but when i enter the game, and press the key and it is " ENTER " or " F " it doesnt work.. does anybody know how to make it work? :/
|
-,-''
Enter or F is not the Action key!
TAB is the Action Key