SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 18/01/2015, 08:12 PM   #1
INKISICION
Big Clucker
 
INKISICION's Avatar
 
Join Date: Jan 2015
Location: Brazil
Posts: 108
Reputation: 4
Default [Help] explanation Float Pos

Coordinates are 14, I have defined 14 and 14
which is the total of cordenadas they are, but would like to know how to make are not alteatorias want to be one x1 say

I put in the number if it was usadoa now use the number 2 and so

pawn Code:
new Float:Pos[14][14] =
{
{2601.381835,-2924.262207,1003.614258,172.96},//1#   -  First follow this after the 2nd
{2581.121093,-2923.645996,1003.614258,172.96},//2#   -  follow after this number 3
{2561.837646,-2923.138183,1003.614258,172.96},//3#   -  follow after this number 4
{2622.049316,-2922.666992,1003.614197,179.15},
{2639.294921,-2924.269042,1003.594178,178.23},
{2663.064941,-2924.369628,1003.593995,180.20},
{2681.447265,-2924.868408,1003.593751,173.48},
{2681.715576,-3038.998779,1003.5931310,3.06},
{2663.098876,-3039.159912,1003.593934,3.17},
{2642.697265,-3038.856201,1003.593995,359.05},
{2622.267089,-3038.787841,1003.593812,359.83},
{2603.442626,-3040.295166,1003.593567,351.02},
{2581.035400,-3039.190917,1003.598511,0.00},
{2561.512451,-3039.699707,1003.613892,358.95}
};
I hope you will want to understand ordered their execution
INKISICION is offline   Reply With Quote
Old 18/01/2015, 08:24 PM   #2
Schneider
Gangsta
 
Schneider's Avatar
 
Join Date: Jun 2007
Location: Netherlands
Posts: 515
Reputation: 136
Default Re: [Help] explanation Float Pos

I don't know how you counted that second 14... I only count 14 rows of 4 coordinates each, so it should be:

pawn Code:
new Float:Pos[14][4] =

If you want to read the data from this array, you can do it like this:

pawn Code:
SetPlayerPos(playerid, Pos[0][0], Pos[0][1], Pos[0][2]);   //first line  = 0
SetPlayerFacingAngle(playerid, Pos[0][3]);                     //first line  = 0

SetPlayerPos(playerid, Pos[1][0], Pos[1][1], Pos[1][2]);   //second line  = 1
SetPlayerFacingAngle(playerid, Pos[1][3]);                     //second line  = 1

SetPlayerPos(playerid, Pos[2][0], Pos[2][1], Pos[2][2]);   //third line  = 2
SetPlayerFacingAngle(playerid, Pos[2][3]);                     //third line  = 2
 
(...)
 
SetPlayerPos(playerid, Pos[13][0], Pos[13][1], Pos[13][2]);   //fourteenth line  = 13
SetPlayerFacingAngle(playerid, Pos[13][3]);                     //fourteenth line  = 13
Schneider is offline   Reply With Quote
Old 18/01/2015, 09:09 PM   #3
INKISICION
Big Clucker
 
INKISICION's Avatar
 
Join Date: Jan 2015
Location: Brazil
Posts: 108
Reputation: 4
Default Respuesta: [Help] explanation Float Pos

Thanks for clarifying this
INKISICION is offline   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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Float:Angle2D(Float:PointA[], Float:PointB[]) warning but I don't get it why... Scrillex Scripting Help 6 26/03/2013 12:52 AM
Whats the easy way to get (Float:minx, Float:miny, Float:maxx, Float:maxy) for GangZoneCreate Issam Scripting Help 7 18/09/2011 06:16 PM
Move3DTextLabel(ID, string[], color, Float:NewX, Float:NewY, Float:NewZ) Eazy_Efolife Help Archive 5 28/06/2011 10:17 PM
OnPlayerClick(playerid, Float:x, Float:y, Float:z) [HELP] Medal Of Honor team Help Archive 6 28/03/2011 01:57 PM
GetArea(&Float:minx,&Float:miny,&Float:maxx,&Float:maxy) pagie1111 Help Archive 1 14/04/2010 10:33 AM


All times are GMT. The time now is 02:57 PM.


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