SA-MP Forums Archive
2 newbie questions but i need their answers - 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: 2 newbie questions but i need their answers (/showthread.php?tid=412456)



2 newbie questions but i need their answers - nor15 - 02.02.2013

1-I use this GameText when i rob a store , but i need it to be in the middle of the screen not Up
PHP код:
GameTextForPlayer(playeridstring30004); 
2- What is the difference between (Float:checkCoords) and ( Float:checkpoints )

I know that they are newbie questions , but i need an answer !


Re: 2 newbie questions but i need their answers - mastermax7777 - 02.02.2013

1: https://sampwiki.blast.hk/wiki/GameTextStyle

GameTextForPlayer(playerid, string, 3000, 5); //changed to style 5

2: no difference, these are just names..


Re: 2 newbie questions but i need their answers - Cameryn - 02.02.2013

1- Try this.
pawn Код:
GameTextForPlayer(playerid, string, 3000, 3); // Changed style to 3
Reference: https://sampwiki.blast.hk/wiki/GameTextStyle

2- Could you show how those two variables being used on the script?


Re: 2 newbie questions but i need their answers - nor15 - 02.02.2013

Quote:
Originally Posted by Cameryn
Посмотреть сообщение
1- Try this.
pawn Код:
GameTextForPlayer(playerid, string, 3000, 3); // Changed style to 3
Reference: https://sampwiki.blast.hk/wiki/GameTextStyle

2- Could you show how those two variables being used on the script?
e.g :
PHP код:
new Float:checkCoords[MAX_POINTS][4] = {
{-
1623.6704,710.2758,-1595.5138,726.3750}, //SFPDEnt 
and
PHP код:
new Float:checkpoints[MAX_POINTS][4] = {
{-
1605.5288,712.4097,13.8714,3.0}, //SFPDEnt 



Re: 2 newbie questions but i need their answers - Cameryn - 02.02.2013

Quote:
Originally Posted by nor15
Посмотреть сообщение
e.g :
PHP код:
new Float:checkCoords[MAX_POINTS][4] = {
{-
1623.6704,710.2758,-1595.5138,726.3750}, //SFPDEnt 
and
PHP код:
new Float:checkpoints[MAX_POINTS][4] = {
{-
1605.5288,712.4097,13.8714,3.0}, //SFPDEnt 
You have to show the code where it's being used. From that information, all I can see that it's a float array of MAX_POINTS items/rows which has 4 cells and returning a floating point.


Re: 2 newbie questions but i need their answers - nor15 - 02.02.2013

Those are the checkpoints of the server , I mean if I made both of them like each others , will it work ?


Re: 2 newbie questions but i need their answers - Cameryn - 02.02.2013

Quote:
Originally Posted by nor15
Посмотреть сообщение
Those are the checkpoints of the server , I mean if I made both of them like each others , will it work ?
I'm not exactly sure how you are using it on the script but I presume it won't work. The reason is that both have different values as you might see and not only that, you will also get an error saying that the variable is not declared as it's being used somewhere on your script.


Re: 2 newbie questions but i need their answers - nor15 - 02.02.2013

Any one else , can help me , btw i use stevo's GM


Re: 2 newbie questions but i need their answers - Patrick - 03.02.2013

Float:checkpoints - Right Coords where the checkpoint you want to be

Float:checkCoords - Point2X,Pount2Y,Point1X,Point1Y


everytime you add 1 checkpoint make sure you also add 1 on #define MAX_POINT 2 because we already have 1 so it will be 2

Point 1 is South-West
Point 2 is North-East
Point 1 is South-West(SW); Point 2 is North-East(NE)


pawn Код:
//Something like this
                _________________ {PointX,PointY};
                |                |
                |    This is     |
                |  the area that |
                |    you want    |
                |   to define    |
                |________________|
{PointX,PointY};
You need this to guide you http://upload.wikimedia.org/wikipedi...n_windrose.svg
and also this for checkCoords = Areacheck https://sampwiki.blast.hk/wiki/Areacheck


Re: 2 newbie questions but i need their answers - Mean - 03.02.2013

You can use ~n~ for a new line in gametexts, that way you can move the text down.