SA-MP Forums Archive
Best way of Doing this? - 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: Best way of Doing this? (/showthread.php?tid=274486)



Best way of Doing this? - iiKyle - 06.08.2011

Checkpoint Streaming.



Ok, Ive Figured there must be an Easier Way T-T.


First of All ive only been Here for 3 Days (If i Sound Retarted how im Doing This)
With that said im Jumped to making my Scratch Script because i have C++ & Direct3D Behind me.
Pawn is Basic C++.

Now im Doing this

#define CP_Store_Entrance 1
#define CP_Store_Exit 2
#define CP_Store_Info 3



So In Game, i go to The Door of the 'STORE', /Save CP_Store_Entrance,
Same with Exit, Ect, Ect.

I'll Do All The Spawn Postions Later :P.

But is there an Easier way? xD

Like.... Doing it another Way or Somthing.


Cheers iiKyle


Re: Best way of Doing this? - Calgon - 06.08.2011

Pawn isn't basic C++ at all, the syntax may have some similarities, but you're wrong.

To your question: easier way of saving your CP store entrances of spawn positions?


Re: Best way of Doing this? - iiKyle - 06.08.2011

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Pawn isn't basic C++ at all, the syntax may have some similarities, but you're wrong.

To your question: easier way of saving your CP store entrances of spawn positions?
That you are Correct, my Mistake.

Yes, what An Easier Way?


Re: Best way of Doing this? - dowster - 06.08.2011

There is a pickup which has the same look as a checkpoint only smaller. Would be a way better way of creating a marker because that is what i assume you are going for. As i believe without a streamer you can have 1024 pickups but you can only have 1 checkpoint.


Re: Best way of Doing this? - Calgon - 06.08.2011

You could create an array with a command that stores coordinates that you set via the command, for example something like:

pawn Код:
new Float: g_fSpawnPoints[(number of checkpoints needed and remove these round brackets)][3];
then a command to set the floats in to that array.


Re: Best way of Doing this? - iiKyle - 06.08.2011

@Dowster

Cheers for the Reply, Thats not What im After - Was Asking whats a Better way to Get The Coords of Places without Save.

@Calg00ne

Nice - I May Take a Look, Cheers for your Help.


Re: Best way of Doing this? - dowster - 06.08.2011

oh now i see what you meant, you could always get your position and do
pawn Код:
new Float:x, Float:y, Float:z, string[128];
GetPlayerPos(playerid, x, y, z)
format(string, sizeof(string), "CreatePickup( pickupid, pickuptype, %f, %f, %f)\r\n", x, y, z);
new File:file = fopen(storepickups.txt, io_append);
fwrite(file, string);
fclose(file)
i think that may work, then its just a copy and paste into your code, that would allow you to restart the server, you could also have the server reload the file so you wouldn't even have to paste the pickup coordinates to your game mode.