SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 11/09/2011, 02:29 PM   #11
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,011
Reputation: 824
Default Re: OnPlayerMarkMap

nice
can you make :
pawn Code:
native GetPlayerMarkedPlace(playerid,Float:X,Float:Y);
native SetPlayerMarkPlace(playerid,Float:X,FloatY); // would be good as GPS or somthing like that :)
native SetMarkColour(markid); // i dont know if its possible xD
will be good
Kaperstone is offline   Reply With Quote
Old 11/09/2011, 02:35 PM   #12
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,694
Reputation: 571
Default AW: OnPlayerMarkMap

This makes no sense for this, since it not a real system to detect where the player marked the map, just a little trick for it..

For the GPS thing you could do (I will do a complete example for it tomorrow):

Code:
//Top of the script:

new GPSx[MAX_PLAYERS];
new GPSy[MAX_PLAYERS];
new GPSz[MAX_PLAYERS];
new bool:GPSon[MAX_PLAYERS];

//command /gps:

SetPlayerMarkingMap(playerid,1);

// In the callback:

if(MarkID == 1)
{
GPSx[playerid] = X;
GPSy[playerid] = Y;
GPSz[playerid] = Z; // Not really needed...
GPSon[playerid] = true;
}

// Then create a timer which checks the distance etc.... and turns off if the destination is reached
I think you didn't really understand the sense for this...

GetPlayerMarkedPlace could be done, but isn't really needed because of the callback.
NaS is online now   Reply With Quote
Old 11/09/2011, 02:39 PM   #13
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,011
Reputation: 824
Default Re: AW: OnPlayerMarkMap

Quote:
Originally Posted by NaS View Post
This makes no sense for this, since it not a real system to detect where the player marked the map, just a little trick for it..

For the GPS thing you could do:

Code:
//Top of the script:

new GPSx[MAX_PLAYERS];
new GPSy[MAX_PLAYERS];
new GPSz[MAX_PLAYERS];
new bool:GPSon[MAX_PLAYERS];

//command /gps:

SetPlayerMarkingMap(playerid,1);

// In the callback:

if(MarkID == 1)
{
GPSx[playerid] = X;
GPSy[playerid] = Y;
GPSz[playerid] = Z; // Not really needed...
GPSon[playerid] = true;
}

// Then create a timer which checks the distance etc.... and turns off if the destination is reached
I think you didn't really understand the sense for this...

GetPlayerMarkedPlace could be done, but isn't really needed because of the callback.
for what your using GPSz? GPSz is useless because it showing only on the map,and not in-game.
and ok,thanks
Kaperstone is offline   Reply With Quote
Old 11/09/2011, 02:52 PM   #14
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,694
Reputation: 571
Default AW: OnPlayerMarkMap

This why I put the comment behind

No problem, I'm currently making an example for a few uses..

EDIT: Added an example for the GPS system!
NaS is online now   Reply With Quote
Old 11/09/2011, 07:41 PM   #15
Kar
Banned
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,939
Reputation: 538
Default Re: OnPlayerMarkMap

No Offense, but what the fuck is this?

if(GDBP(mapLastX[playerid], mapLastY[playerid], mapLastZ[playerid],X,Y,Z) > 5)

that doesn't mean a player marked on the map??.....
Kar is offline   Reply With Quote
Old 11/09/2011, 08:27 PM   #16
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Posts: 1,216
Reputation: 141
Default Re: OnPlayerMarkMap

Quote:
Originally Posted by Kar View Post
No Offense, but what the fuck is this?

if(GDBP(mapLastX[playerid], mapLastY[playerid], mapLastZ[playerid],X,Y,Z) > 5)

that doesn't mean a player marked on the map??.....
This is getdistancebetweenpoints. I don't know why is he using this, because theres IsPlayerInRangeOfPoint native.
And do my suggestion, since now you can only check for teleproting WHEN the script KNOWS that.
wups is offline   Reply With Quote
Old 12/09/2011, 06:15 AM   #17
zaq.selfown
Little Clucker
 
Join Date: Sep 2011
Posts: 8
Reputation: 0
Default AW: OnPlayerMarkMap

and this is the sense lol
The player should not be allowed to teleport all the time
zaq.selfown is offline   Reply With Quote
Old 12/09/2011, 02:41 PM   #18
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,694
Reputation: 571
Default AW: OnPlayerMarkMap

wups, the sense of this IS that the script knows that, otherwise there is no need for "SetPlayerMarkingMap" ...

Sure, the native would be better.. But you can edit this yourself..
NaS is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.