SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 177
Search took 0.01 seconds.
Search: Posts Made By: DomagojSellug
Forum: Scripting Help 18/08/2019, 10:04 AM
Replies: 9
Views: 247
Posted By DomagojSellug
Re: How to make a server pick a certain percentage of players?

I tested the script with my friends and it seems to work. Thank you so much for the help!!! :)
Forum: Scripting Help 16/08/2019, 10:50 PM
Replies: 9
Views: 247
Posted By DomagojSellug
Re: How to make a server pick a certain percentage of players?

Yeah, I was looking at that code and it seemed weird, so I will go with this one instead. Once again, when I get at least 3-4 people to test it with, I will make sure to tell you how it goes. I...
Forum: Scripting Help 16/08/2019, 09:51 PM
Replies: 9
Views: 247
Posted By DomagojSellug
Re: How to make a server pick a certain percentage of players?

This code seems easier for me to understand...


... but I will try this one too and let you know how it goes once I get someone to test it with.
Forum: Scripting Help 15/08/2019, 03:12 PM
Replies: 9
Views: 247
Posted By DomagojSellug
Re: How to make a server pick a certain percentage of players?

new PlayersInServer;
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)) PlayersInServer++;
}
new rand;

for(new picker=0;picker<=PlayersInServer;picker++)
{
rand...
Forum: Scripting Help 15/08/2019, 02:41 PM
Replies: 9
Views: 247
Posted By DomagojSellug
How to make a server pick a certain percentage of players?

For example, I want the script to pick 40% of random players to be terrorists, and the other 60% to be the police. How can I make that happen so it doesn't glitch out?

I thought of making a loop...
Forum: Scripting Help 10/08/2019, 02:06 PM
Replies: 6
Views: 157
Posted By DomagojSellug
Re: Players are invisible when entering interiors

Well, actually, the pickups are only there to show the text. /enter works entirely based on which position player is in (is player in range of point).

But, what you mean is, e.g.

StorePickup[1]...
Forum: Scripting Help 10/08/2019, 12:45 PM
Replies: 6
Views: 157
Posted By DomagojSellug
Re: Players are invisible when entering interiors

Aren't players supposed to be invisible if they are in different virtual worlds?



What do you mean? I assigned each business ID to the virtual world, let me show you the list:

/*
Each...
Forum: Scripting Help 09/08/2019, 09:55 PM
Replies: 6
Views: 157
Posted By DomagojSellug
Players are invisible when entering interiors

I made an enter/exit system for my server and I have spent (way too) much time on it only for it to give me this weird bug that is so frustrating.

So, the way it works is, each /enter point has...
Forum: Scripting Help 06/08/2019, 08:53 AM
Replies: 4
Views: 121
Posted By DomagojSellug
Re: "Unknown command" even if it works.

I will try this one and see if it works.



Unfortunately, I tried it and it didn't work.
Forum: Scripting Help 05/08/2019, 11:55 PM
Replies: 4
Views: 121
Posted By DomagojSellug
"Unknown command" even if it works.

Here I am with (yet) another SAMP issue lol

For some reason the server gives me an "unknown command" error even if the command kinda works...


CMD:closefood(playerid, params[])
{...
Forum: Scripting Help 05/08/2019, 11:44 PM
Replies: 2
Views: 74
Posted By DomagojSellug
Re: Server returns random numbers instead of the ones I set

Yes! Works great now! Thanks a lot man, I appreciate it. REP+
Forum: Scripting Help 05/08/2019, 03:23 PM
Replies: 2
Views: 74
Posted By DomagojSellug
Server returns random numbers instead of the ones I set

I tried to make a /streetname command, and I used the "zones" include which I edited a bit so I can show the area code too.

And, I noticed that they don't show up properly ingame.

Here, let's...
Forum: Scripting Help 02/08/2019, 07:09 PM
Replies: 4
Views: 107
Posted By DomagojSellug
Re: Unknown command even if it works...

Okay, so I fixed it by adding return 1; inside of the loop, but is it a good solution? I am afraid that it might lag my server if many people are in one radio channel and it just has to return 1 lots...
Forum: Scripting Help 02/08/2019, 07:06 PM
Replies: 4
Views: 107
Posted By DomagojSellug
Unknown command even if it works...

I made a radio system for my script and so far it works great. I can set the channel, leave the channel, etc.
However, there is a huge issue I am having, and that is the server returning "unknown...
Forum: Scripting Help 01/08/2019, 10:22 PM
Replies: 2
Views: 93
Posted By DomagojSellug
Number of arguments does not match definition

cache_get_value_name(0, "IP", PI[playerid][pIP]) gives me the warning. I don't know why it's happening.

Here's every mention of "pIP" in my code for now:


enum PLAYER_ENUM {
pIP[16]
}
...
Forum: Scripting Help 21/07/2019, 03:39 PM
Replies: 5
Views: 136
Posted By DomagojSellug
Re: Some MYSQL errors when saving vehicles

I'll try it, thanks for the help! :)

EDIT: Vehicles aren't saving for some reason, so I'll just use a different system. Still, I will give you REP. :)
Forum: Scripting Help 21/07/2019, 11:46 AM
Replies: 5
Views: 136
Posted By DomagojSellug
Re: Some MYSQL errors when saving vehicles

How can I do that? I would appreciate it if you could write the script here.
Forum: Scripting Help 21/07/2019, 08:17 AM
Replies: 6
Views: 136
Posted By DomagojSellug
Re: Random server messages

Wow, that really is better. I might use it too lol
Forum: Scripting Help 21/07/2019, 12:04 AM
Replies: 5
Views: 136
Posted By DomagojSellug
Some MYSQL errors when saving vehicles

SaveVehicle(vehicleid) {

if(!Iter_Contains(ServerVehicles, vehicleid)) return 0;

format(vInfo[vehicleid][vehName], 16, GetVehicleName(vInfo[vehicleid][vehModel]));
...
Forum: Scripting Help 21/07/2019, 12:01 AM
Replies: 2
Views: 82
Posted By DomagojSellug
Re: Players can exit houses no matter if they're in the pickup or not.

I fixed it, I have decided to use the original script with minor changes. Thanks anyways! :D
Forum: Scripting Help 20/07/2019, 09:32 PM
Replies: 2
Views: 82
Posted By DomagojSellug
Players can exit houses no matter if they're in the pickup or not.

I am using "house system" by "rootcause": https://forum.sa-mp.com/showthread.php?t=568319 , but I have edited the script so the house is entered and exited by using 'F'. I did the same with his...
Forum: Scripting Help 20/07/2019, 09:27 PM
Replies: 5
Views: 176
Posted By DomagojSellug
Re: clearing an enum

enum eEnum
{
eVar1,
eVar2,
eVar3
}

new MyVar[eEnum];

//somewhere in your script
Forum: Scripting Help 20/07/2019, 09:25 PM
Replies: 2
Views: 64
Posted By DomagojSellug
Re: CreateDynamicCP 4 errors

I FIXED IT, THIS CAN BE DELETED. I SIMPLY WON'T USE CHECKPOINTS, BUT PICKUPS INSTEAD.
Forum: Scripting Help 20/07/2019, 06:46 PM
Replies: 6
Views: 136
Posted By DomagojSellug
Re: Random server messages

I would do it like this:

public OnGameModeInit()
{
SetTimer("RandomMSG", 180000, true); // There is no need to kill the timer since it will automatically execute the 'RandomMSG' function...
Forum: Scripting Help 20/07/2019, 04:57 PM
Replies: 2
Views: 64
Posted By DomagojSellug
Re: CreateDynamicCP 4 errors

This is what happens when I try to make exit checkpoints:
BusinessInteriors[i][ExitPickup] = CreateDynamicCP(BusinessInteriors[i][InteriorX], BusinessInteriors[i][InteriorY],...
Showing results 1 to 25 of 177

 

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


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