SA-MP Forums Archive
Change script methode - 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: Change script methode (/showthread.php?tid=587326)



Change script methode - Roberto80 - 29.08.2015

Hi,so its just a question,
If,foreach is better than loop,why to don't replace it with?
Same for YCMD(or zcmd) and OnPlayerCommandText,
Same for y_ini (or mysql/d_ini) and normal saving methode,
Same for sscanf and normal way(strtok bla bla bla),
Same for FCNPC and normal NPC,
Same for a lot..
And what about to add some includes/plugins directly to samp? Like whirlpool,new actors functions and alot more...


Re: Change script methode - Nixco - 29.08.2015

Interesting topic.

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
If,foreach is better than loop,why to don't replace it with?
foreach takes more memory but is faster, for() is slower but takes less memory.

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
Same for YCMD(or zcmd) and OnPlayerCommandText,
Same for y_ini (or mysql/d_ini) and normal saving methode,
Same for sscanf and normal way(strtok bla bla bla),
Same for FCNPC and normal NPC,
Same for a lot..
There are many ways of writing code, and every scripter differs from another. It's up to the scripter to choose their favourite way of doing something.

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
And what about to add some includes/plugins directly to samp? Like whirlpool,new actors functions and alot more...
This would go here.


Re: Change script methode - ThePhenix - 29.08.2015

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
Hi,so its just a question,
If,foreach is better than loop,why to don't replace it with?
Same for YCMD(or zcmd) and OnPlayerCommandText,
Same for y_ini (or mysql/d_ini) and normal saving methode,
Same for sscanf and normal way(strtok bla bla bla),
Same for FCNPC and normal NPC,
Same for a lot..
And what about to add some includes/plugins directly to samp? Like whirlpool,new actors functions and alot more...
It's up to you if you want to use deprecated functions or not.