SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 30/12/2019, 10:32 AM   #1
newbie1008
Little Clucker
 
Join Date: Oct 2018
Posts: 15
Reputation: 0
Post HELP FOR FASTER WRITE IN PAWNO

#define MAX_OBJECT 100
static Object[MAX_OBJECT];

and for example...
Code:
CreateObject(12805, -1073.17, -730.09, 45.10,   0.00, 0.00, 0.50);
CreateObject(13198, -1009.79, -737.51, 36.09,   0.00, 0.00, 0.00);
CreateObject(17019, -1097.86, -599.76, 36.91,   0.00, 0.00, 0.00);
CreateObject(17019, -1077.68, -599.82, 36.93,   0.00, 0.00, 0.00);
CreateObject(12934, -1101.30, -625.07, 34.32,   0.00, 0.00, 0.00);
CreateObject(12934, -1101.19, -637.77, 34.32,   0.00, 0.00, 0.00);
CreateObject(12934, -1101.73, -685.37, 34.32,   0.00, 0.00, 0.00);
CreateObject(3627, -982.00, -666.96, 33.46,   0.00, 0.00, 0.00);
CreateObject(3578, -988.13, -676.83, 30.28,   0.00, 0.00, 90.00);
CreateObject(3578, -988.13, -667.00, 30.28,   0.00, 0.00, 90.00);
i want to do all like this
Code:
Object[1] = CreateObject(12805, -1073.17, -730.09, 45.10,   0.00, 0.00, 0.50);
Object[2] = CreateObject(13198, -1009.79, -737.51, 36.09,   0.00, 0.00, 0.00);
CreateObject(17019, -1097.86, -599.76, 36.91,   0.00, 0.00, 0.00);
CreateObject(17019, -1077.68, -599.82, 36.93,   0.00, 0.00, 0.00);
CreateObject(12934, -1101.30, -625.07, 34.32,   0.00, 0.00, 0.00);
CreateObject(12934, -1101.19, -637.77, 34.32,   0.00, 0.00, 0.00);
CreateObject(12934, -1101.73, -685.37, 34.32,   0.00, 0.00, 0.00);
CreateObject(3627, -982.00, -666.96, 33.46,   0.00, 0.00, 0.00);
CreateObject(3578, -988.13, -676.83, 30.28,   0.00, 0.00, 90.00);
CreateObject(3578, -988.13, -667.00, 30.28,   0.00, 0.00, 90.00);
CreateObject(3578, -988.13, -656.32, 30.28,   0.00, 0.00, 90.00);
But how can I do, that the "object [number] =" appear in each line automaticaly, because I have 3000 objects and it really piss me off to write in each line "object [number] ="...
newbie1008 is offline   Reply With Quote
Old 30/12/2019, 10:37 AM   #2
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,162
Reputation: 73
Default Re: HELP FOR FASTER WRITE IN PAWNO

why do u need that?
use another IDE (such as sublime) and middle mouse button for "fast writing / editing"

also, Object[2999] = CreateObject.. at the last object, might be useful, depends what you're trying to do.
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 30/12/2019, 10:46 AM   #3
newbie1008
Little Clucker
 
Join Date: Oct 2018
Posts: 15
Reputation: 0
Default Re: HELP FOR FASTER WRITE IN PAWNO

i Don't know what do you mean,I want to put all of this into 1 array whose maximum value is 100, here is Object [number], I can access it more easily.
newbie1008 is offline   Reply With Quote
Old 31/12/2019, 07:23 AM   #4
Beckett
High-roller
 
Beckett's Avatar
 
Join Date: Feb 2012
Location: www.finalnights-rp.com
Posts: 1,794
Reputation: 104
Default Re: HELP FOR FASTER WRITE IN PAWNO

You want to do that through PAWN? If so, then dump all of your 3000 objects in a simple .txt file then make a code that retrieves each entry of the file. Add a variable that will keep increasing each time an entry is processed, and there you go - they're done.

https://wiki.sa-mp.com/wiki/File_Functions
__________________
Final Nights Roleplay
The first SA-MP server that is not regulated by administrators.
No OOC hierarchy. Strictly directed by players. Utopian vision.

El primer servidor SA-MP que no está regulado por los administradores.
Sin jerarquías OOC. Estrictamente dirigido por jugadores. Visión utópica.

Primul server de SA-MP care nu este regulat de administratori.
Fără ierarhie OOC. Strict dictat de jucători. Visiune utopică.

Yöneticiler tarafından düzenlenmeyen ilk SA-MP sunucusu.
OOC hiyerarşisi yok. Kesinlikle oyuncular tarafından yönetiliyor. Ütopik görme.


Become a Member of our Discord Channel
Beckett 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
Faster than PAWNO? Ultraz Everything and Nothing 74 23/08/2017 03:56 AM
HELP FOR FASTER WRITE IN PAWNO Supermaxultraswag Scripting Help 4 02/10/2014 08:03 PM
Need help with server (can't compile to .amx, pawno can't write to settings.ini) gychem Server Support 5 12/06/2014 10:56 AM
How to align script faster in pawno ? Jhony_Blaze Scripting Help 2 25/12/2013 01:55 PM
Write .cfgs with Pawno? Leettari Help Archive 3 26/04/2009 11:57 AM


All times are GMT. The time now is 06:02 AM.


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