SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.03 seconds.
Search: Posts Made By: Kwarde
Forum: Scripting Help 04/07/2020, 10:54 PM
Replies: 7
Views: 235
Posted By Kwarde
Re: Question about YSI

Use notepad++. It shows length of the text. Alternatively, if you have this string: "Your ID is %d!", and your max playerID is 150 and thus 5 characters lang, you could do this:
new string[] = "Your...
Forum: Scripting Help 04/07/2020, 09:47 PM
Replies: 7
Views: 235
Posted By Kwarde
Re: Question about YSI

YSI_Coding\y_va* (if no warning is displayed, you are using an older version of YSI and I can recommend you to upgrade to the latest YSI).


In normal situations you don't need to use EOS, this...
Forum: Scripting Help 04/07/2020, 09:00 PM
Replies: 11
Views: 274
Posted By Kwarde
Re: samp.ban and temporary banning

MySQL is indeed multi threaded, I even use MySQL for things like sorting arrays through MySQL instead of PAWN array sort functions.
As for the timer set for the next ban; good one, didn't think of...
Forum: Scripting Help 04/07/2020, 12:17 PM
Replies: 1
Views: 60
Posted By Kwarde
Re: How do i install YSI on my SAMP server?

The same way you include every plugin.
Place all the files and folders in your pawno include directory, and then you can start including them in your scripts.
Forum: Scripting Help 04/07/2020, 12:13 PM
Replies: 7
Views: 235
Posted By Kwarde
Re: Question about YSI

This is the case for all strings (unless if you're using the dynamic memory plugin).
Strings (arrays) are basically just a bunch of variables. PAWN reads these arrays as strings. All string...
Forum: Scripting Help 04/07/2020, 11:47 AM
Replies: 11
Views: 274
Posted By Kwarde
Re: samp.ban and temporary banning

To unban him at the exct timestamp is nearly impossible. This would have to be achieved by using a timer, and you don't want to check for expired bans every second.
Keep in mind that SAMP is single...
Forum: Gamemode Scripts 04/07/2020, 05:12 AM
Replies: 154
Views: 33,717
Posted By Kwarde
Re: San Fierro Cops And Robbers

If there are errors, look in this topic for fixes (they're bound to be there).
Apart from that, don't use compiler (pawncc) that comes from sa-mp.com but use the community (aka Zeex's) compiler.
...
Forum: Server Support 03/07/2020, 03:15 PM
Replies: 2
Views: 117
Posted By Kwarde
Re: Transferring to another host

I wouldn't do that if I were you. Atleast not a full snapshot, because of links/data to/about system hardware and hostkeys. It's not that hard to set up samp and a webhost from a clean installation....
Forum: Scripting Help 02/07/2020, 04:23 PM
Replies: 3
Views: 82
Posted By Kwarde
Re: Run time error 4

Runtime error 4: Array index out of bounds.

It means it tries to get data from an array from an index that does not exist. It literally says that:
[22:05:28] [debug] Run time error 4: "Array...
Forum: Server Support 01/07/2020, 01:47 PM
Replies: 5
Views: 210
Posted By Kwarde
Re: Server offline

Depending what user and group own the file, I always setup permissions as: owner root:dev (dev being used by the developers and to start the server), all files as 770 (rwxrwx---) and samp03svr and...
Forum: Scripting Help 30/06/2020, 02:18 PM
Replies: 3
Views: 111
Posted By Kwarde
Re: I got warning how to fix it?

Yes, I just got out of bed and didn't have enough coffee yet ;P HEALTH obviously should had been HELMET
Forum: Scripting Help 30/06/2020, 12:05 PM
Replies: 3
Views: 111
Posted By Kwarde
Re: I got warning how to fix it?

ITEM_TYPE_HEALTH expects to be an integer (or rather, a value with no tag / underscore tag).
durability is a floating number. Tag ITEM_TYPE_HEALTH with Float.
Forum: Scripting Help 28/06/2020, 06:13 PM
Replies: 8
Views: 254
Posted By Kwarde
Re: Help /admins

This is how I would do it:


new const AdminLevelName[][] = {
"User",
"Semi Administrator [Level 1]",
"Semi Administrator [Level 2]",
"Semi Administrator [Level 3]",
"Administrator",...
Forum: Scripting Help 28/06/2020, 05:36 PM
Replies: 4
Views: 76
Posted By Kwarde
Re: what is wrong with create faction command

Using AUTO_INCREMENT, the only way to do that (as far as I know) is by manually setting the ID after inserting a row.
If you want to start all over you'd have to clear the entire table
TRUNCATE...
Forum: Scripting Help 28/06/2020, 05:11 PM
Replies: 9
Views: 273
Posted By Kwarde
Re: Socket has failed to bind on port

Yes, it shows that port 7780 is used by samp03svr. After closing the server (killing the process) you should use that command to see if it's somehow still used.
Forum: Scripting Help 28/06/2020, 05:07 PM
Replies: 4
Views: 76
Posted By Kwarde
Re: what is wrong with create faction command

I only looked at the query:
INSERT INTO 'factions' ('ID', 'FactionName', 'FactionLeader', 'Rank1name', 'Rank2name', 'Rank3name', 'Rank4name', 'Rank5name'

1- For table names, you either have to...
Forum: Scripting Help 28/06/2020, 04:02 PM
Replies: 9
Views: 273
Posted By Kwarde
Re: Socket has failed to bind on port

Use:
lsof -i:port
To see what process(es) use a certain port (replace port with the actual port, ofc). Maybe it somehow is still used.
Forum: Scripting Help 28/06/2020, 03:13 PM
Replies: 8
Views: 254
Posted By Kwarde
Re: Help /admins

Some notices:
- That script would only show the admin with the highest playerid.
- If SemiAdmin for someone is not 1,2 or 3, it would:
* Show nothing at all if the lowest playerid has that level...
Forum: Scripting Help 28/06/2020, 11:55 AM
Replies: 7
Views: 115
Posted By Kwarde
Re: Help with playing audio stream

1) partyy must be a global variable
2) the function Create..Rectangle has 7 parameters
CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid...
Forum: Scripting Help 28/06/2020, 11:31 AM
Replies: 6
Views: 119
Posted By Kwarde
Re: mysql from r33 to r40

https://forum.sa-mp.com/showthread.php?t=616103
Forum: Scripting Help 28/06/2020, 10:47 AM
Replies: 5
Views: 107
Posted By Kwarde
Re: Vehicle wont show correctly

I thought so. listitem is not the same as the carid.
Let's say you have three results:

* Infernus (carid 5) [listitem = 0]
* Turismo (carid 9) [listitem = 1]
* NRG (carid 12) [listitem = 2]
...
Forum: Scripting Help 28/06/2020, 10:43 AM
Replies: 3
Views: 100
Posted By Kwarde
Re: Find player by name

To give some extra info about stock: Using keyword stock you indeed tell the compiler the piece of code is not required to use (thus not showing a warning if it's unused).
In gamemodes, you usually...
Forum: Scripting Help 28/06/2020, 10:36 AM
Replies: 5
Views: 107
Posted By Kwarde
Re: Vehicle wont show correctly

What's the code under OnDialogResponse()?

Also:
for(new i = 1; i <= cache_num_rows(); i++)
I suggest you to use:

for (new i, rows = cache_num_rows(); i < rows; i++)
//Or, even better yet:...
Forum: Scripting Help 28/06/2020, 12:05 AM
Replies: 4
Views: 103
Posted By Kwarde
Re: bCrypt Migration...

I never used bcrypt so I probably can't help you (didn't look at the code yet though), but wondering, why not use SHA256_PassHash() (included in SAMP since 0.3.7 R1)...
Forum: Scripting Help 28/06/2020, 12:03 AM
Replies: 3
Views: 83
Posted By Kwarde
Re: Prevent damage to teammates

You could simply use SetPlayerTeam() instead.
https://wiki.sa-mp.com/wiki/SetPlayerTeam
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 10:42 PM.


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