SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 43
Search took 0.00 seconds.
Search: Posts Made By: Viggo
Forum: Scripting Help 02/05/2019, 05:26 PM
Replies: 9
Views: 385
Posted By Viggo
Re: Looping with foreach

I will listen to you, because the way it is right now is never gonna make a single bug, 100% success, but making iterators may create bugs somehow.

Thank you both for your help! :D
Forum: Scripting Help 02/05/2019, 12:27 PM
Replies: 9
Views: 385
Posted By Viggo
Re: Looping with foreach

But like.. I have 50 zones, and let's say 150 max players.

So the iterator will be: Iterator: playerInZones [ 50 ] [ 150 ], isnt that very huge?
Forum: Scripting Help 01/05/2019, 09:28 PM
Replies: 9
Views: 385
Posted By Viggo
Re: Looping with foreach

If I make a new iterator: ZonePlayers[ MAX_ZONES ] < MAX_PLAYERS >

So the new Iterator holds the players that are in the specified zone only, like ZonePlayers[ 2 ] has the players that are in zone...
Forum: Scripting Help 01/05/2019, 08:13 AM
Replies: 9
Views: 385
Posted By Viggo
Re: Looping with foreach

Forget whatever I wrote up there, and answer this question:

Is it fine to loop over all players whenever any player enters a dynamic CP (zone)? Or it makes the server laggy?
Forum: Scripting Help 01/05/2019, 07:24 AM
Replies: 9
Views: 385
Posted By Viggo
Looping with foreach

Hello everybody,

I have a little question about some zone turfing system, first let me tell you how it works:

Whenever someone enters a zone, his variable p_InZone[ playerid ] is set to the...
Forum: Gamemode Scripts 05/04/2019, 05:52 PM
Replies: 154
Views: 37,316
Posted By Viggo
Forum: Scripting Help 04/04/2019, 10:40 AM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

Yeah, this is it. This is what I was looking for.

REP'd, thank you.
Forum: Scripting Help 03/04/2019, 06:51 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

Lol, not that way. This is what I mean:


enum RandomPoints
{
Float:wcrm_X,
Float:wcrm_Y,
Float:wcrm_Z,
Float:wcrm_RZ
};
Forum: Scripting Help 03/04/2019, 06:47 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

This isn't the idea I need, but just a little tip for you: I don't need to have a maximum size for the spawn points, I can do it with even more efficient way by not specifying a length for the array,...
Forum: Scripting Help 03/04/2019, 06:13 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

Okay so I've just realized that I will be spawning vehicles! And not players lol. Vehicles will be randomly spawning there, and what I'm willing to use, is.. add to each spawn point the VehicleID...
Forum: Scripting Help 03/04/2019, 06:08 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

Another cool idea, maybe nice.

But I've just realized that I can have a more efficient idea. Which is adding "wcrm_LastSpawned" adjective to the enum, when the player is spawned, wcrm_LastSpawned...
Forum: Scripting Help 03/04/2019, 06:03 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

At the beginning of the idea it's the same, but Private200 added a nice touch to his idea at the end which is the touch I need, but I'm waiting for more ideas, more efficient ideas if there are any....
Forum: Scripting Help 03/04/2019, 06:01 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

This is a good idea. Will wait for more ideas.




You need to re-read the main post, afterwards, re-think about the idea. I'm fully understanding the way it works but you are too lazy to read I...
Forum: Scripting Help 03/04/2019, 05:59 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

No dude, I want them to spawn on another random point purposely, I have enough knowledge about the way it works, but the concept is that they will respawn again and again till I write the command...
Forum: Scripting Help 03/04/2019, 05:49 PM
Replies: 19
Views: 436
Posted By Viggo
Re: Check if point is occupied

I've used this idea before, but when players will die again and they will respawn to another random point. Like in 10 minutes, all random points will be "used", and players won't be able to respawn...
Forum: Scripting Help 03/04/2019, 05:17 PM
Replies: 19
Views: 436
Posted By Viggo
Check if point is occupied

Hello people.

In this thread, I most likely want help with an idea to implement, so where it is:

I have an enum for random points (code below), I have like 50 points of these, and when I write...
Forum: Scripting Help 03/04/2019, 05:12 PM
Replies: 9
Views: 366
Posted By Viggo
Re: Array index out of bounds

Write ObjectSpawned[SpawnedObject][objects] instead.
Forum: Scripting Help 02/04/2019, 05:45 PM
Replies: 8
Views: 306
Posted By Viggo
Re: array index out of bounds

Okay nvm fixed, the problem was in having those default values in the enum. Have no clue why it's buggy tho.
Forum: Scripting Help 02/04/2019, 05:33 PM
Replies: 8
Views: 306
Posted By Viggo
Re: array index out of bounds

Okay, this is the full code: https://pastebin.com/Lg69bi9s

It's a filterscript, I compile, I get the "array index out of bounds" error at the last callback (commented next to the error line).
...
Forum: Scripting Help 02/04/2019, 02:59 PM
Replies: 8
Views: 306
Posted By Viggo
Re: array index out of bounds

That pastebin is an include file, I copied the whole include and pasted it in the pastebin.

There is no much included before this include file, they are all like zcmd includes and stuff.
Forum: Scripting Help 02/04/2019, 01:40 PM
Replies: 8
Views: 306
Posted By Viggo
array index out of bounds

I have wrote a little code, and I'm getting the array index out of bound error, the error is because of the last line.

Link: https://pastebin.com/FfK57zcS

I have tried many things but error...
Forum: Screenshots and Videos 13/03/2019, 07:19 AM
Replies: 3
Views: 850
Posted By Viggo
Kiki - SAMP Edition

I have recorded this video few months ago, and I've just remembered that it would be a good idea if I share it on SAMP forums:

Please share the video around and don't forget to leave a thumb-up,...
Forum: Scripting Help 11/03/2018, 07:23 AM
Replies: 7
Views: 739
Posted By Viggo
Re: Gamemode optimisation

Streamer would help to have less objects created on the server in the same time, like, if no objects are streamed by players, the server won't need to load any, server loads needed objects and...
Forum: Tutorials 31/01/2018, 08:03 PM
Replies: 6
[Tutorial] How to use y_ini
Views: 11,154
Posted By Viggo
Re: How to use y_ini

Hello everyone,

I made a command for players, to load a file. They just write the file name and the file is supposed to be loaded, but instead, the LoadObj callback is called many many times and...
Forum: Includes 31/01/2018, 08:01 PM
Replies: 7
Views: 38,697
Posted By Viggo
Re: y_ini - Fast INI file reading and writing.

Hello everyone,

I made a command for players, to load a file. They just write the file name and the file is supposed to be loaded, but instead, the LoadObj callback is called many many times and...
Showing results 1 to 25 of 43

 

All times are GMT. The time now is 04:53 PM.


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