SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 500
Search took 0.02 seconds.
Search: Posts Made By: Kwarde
Forum: Scripting Help 30/05/2020, 05:57 PM
Replies: 6
Views: 111
Posted By Kwarde
Re: Server is crashing

A public production environment (or anything public) should never have 777 permissions unless if it's something like cache files, upload directory etc.
777 equals: rwxrwxrwx, which is in the format...
Forum: Server Support 29/05/2020, 10:49 AM
Replies: 9
Views: 157
Posted By Kwarde
Re: CHEAP VPS

That's like saying: I either want more RAM or more memory.
https://www.youtube.com/watch?v=NdREEcfaihg
Forum: Scripting Help 29/05/2020, 09:14 AM
Replies: 2
Views: 248
Posted By Kwarde
Re: warning 214...

Since it was bumped already anway; the parameter -w disables a specific warning.
Alternatively (if you're using community compiler), you can add this in your script aswell: #pragma warning disable...
Forum: Scripting Help 28/05/2020, 02:43 PM
Replies: 2
Views: 64
Posted By Kwarde
Re: Im immortal on my server

Look for all SetPlayerHealth functions in your script. If there are non constant values, make sure to print those values to see whats going on
Forum: Scripting Help 27/05/2020, 09:14 PM
Replies: 8
Views: 223
Posted By Kwarde
Re: Discord DCC_GetRoleName

Are you sure that there are no more "break"s in the "My actions" part?
The second example should absolutely not be done. break stops a loop and proceeds to code after the loop. If we take this...
Forum: Scripting Help 27/05/2020, 10:29 AM
Replies: 8
Views: 223
Posted By Kwarde
Re: Discord DCC_GetRoleName

DCC_GetGuildMemberRoleCount(guild, author, roleCount);
if(channel == g_Discord_Admin_CMD) {
if(!strcmp(command, "!mycommand", true)) {
//Loop through all roles for this user
...
Forum: Scripting Help 26/05/2020, 10:22 AM
Replies: 4
Views: 100
Posted By Kwarde
Re: can i do this? (||)

Nope.
Tip: Create a filterscript and create a similar code to test it if you wanna know something like this. Example:


#include <a_samp>

enum
{
Role1 = 1,
Role2,
Forum: Gamemode Scripts 25/05/2020, 08:41 PM
Replies: 144
Views: 30,818
Posted By Kwarde
Re: San Fierro Cops And Robbers

https://github.com/Whitetigerswt/SAMP_AC_v2 ?
Forum: Scripting Help 24/05/2020, 09:58 PM
Replies: 7
Views: 98
Posted By Kwarde
Re: Error 022: must be lvalue (non-constant)

1) https://wiki.sa-mp.com/wiki/Strtok :


2) You should use something like Y_COMMANDS or Pawn.CMD instead of dcmd, it's highly outdated aswell

3) You should use something like Y_INI or MySQL...
Forum: Scripting Help 21/05/2020, 02:10 PM
Replies: 14
Views: 408
Posted By Kwarde
Re: I need a working detection of country script

Nope.
Might wanna read this article: https://www.comparitech.com/blog/vpn-privacy/how-easy-is-it-to-detect-a-vpn/

To sum everything up from that article (it's literally a quote of it)
Forum: Scripting Help 21/05/2020, 12:33 PM
Replies: 14
Views: 408
Posted By Kwarde
Re: I need a working detection of country script

https://wiki.sa-mp.com/wiki/HTTP ;

HTTP_ERROR_BAD_HOST 1
HTTP_ERROR_NO_SOCKET 2
HTTP_ERROR_CANT_CONNECT 3
HTTP_ERROR_CANT_WRITE 4
HTTP_ERROR_CONTENT_TOO_BIG 5...
Forum: Scripting Help 21/05/2020, 02:53 AM
Replies: 4
Views: 147
Posted By Kwarde
Re: warning 239: literal array/string passed to a non-const parameter

Use this on top of your script:
#pragma warning disable 214,239

Alternatively you can run pawncc with option -w (disables specific warning(s))
Forum: Scripting Help 20/05/2020, 05:11 PM
Replies: 2
Views: 87
Posted By Kwarde
Re: I cant compile !!

It seems core.inc (default include that comes with the SAMP server package) was modified.
Line 12 is "native heapspace();" -Something went wrong there and thus heapspace() was never declared (hence...
Forum: Scripting Help 20/05/2020, 04:55 PM
Replies: 14
Views: 408
Posted By Kwarde
Re: I need a working detection of country script

This whole thing can be done so much easier:


//Get IP and send that data:
new string[45];
GetPlayerIp(playerid, string, 16);
format(string, sizeof(string), "ip-api.com/csv/%s?fields=3",...
Forum: Scripting Help 20/05/2020, 02:22 PM
Replies: 3
Views: 128
Posted By Kwarde
Re: dini to mysql

Sidenote: It is possible but only with constant values, eg.


new myArray[] = "Hello world!", otherArray[] = "Hello other world!";
otherArray = myArray;
//Now both arrays will print "Hello...
Forum: Filterscripts 17/05/2020, 09:04 PM
Replies: 4,019
Views: 2,220,175
Posted By Kwarde
Re: Useful Functions

Couldn't find a function for this so figured I created one: similar_hexes.
It compares two hex colors (in 0xRRGGBB format, not any other format such as 0xRRGGBBAA or 0xAARRGGBB) and decides if they...
Forum: Scripting Help 17/05/2020, 06:29 PM
Replies: 4
Views: 86
Posted By Kwarde
Re: Need a Little Help

TIP: Whenever you're getting a "number of arguments does not match definition" warning, go to SAMP's Wiki page (if it's a native SAMP function). --"number of arguments does not match definition"...
Forum: Scripting Help 17/05/2020, 04:20 PM
Replies: 9
Views: 141
Posted By Kwarde
Re: [Help] Beginner Help

That big pdf is the official pawn language guide from the creators of the language. If you really want to learn pawn, that is the perfect document to start with.
Forum: Scripting Help 17/05/2020, 03:33 PM
Replies: 9
Views: 141
Posted By Kwarde
Re: [Help] Beginner Help

%s and %d are format specifiers. s for strings, d for decimals, i for integers, f for floats etcetera.
More information on format() and the format specifiers here: https://wiki.sa-mp.com/wiki/Format...
Forum: Scripting Help 17/05/2020, 01:11 PM
Replies: 9
Views: 141
Posted By Kwarde
Re: [Help] Beginner Help

First of all, the language is Pawn and not pawno (pawno is an editor, which uses pawncc as compiler).

You may want to start with this one:...
Forum: Screenshots and Videos 15/05/2020, 08:51 PM
Replies: 6
Views: 441
Posted By Kwarde
Re: [MAPS] RANDOM OLD MAPS (FLASHBACK FRIDAY)

That's pretty nice indeed! Also, Ezio <3
Forum: Scripting Help 15/05/2020, 08:29 PM
Replies: 16
Views: 266
Posted By Kwarde
Re: error 047: array sizes do not match, or destination array is too small

This is only possible with literal or pre-defined strings.


new helloWorld[] = "Hey there cruel world!", myWorld[] = "This is my world!";

main()
{
helloWorld = "Hello world!"; //Valid
...
Forum: Scripting Help 15/05/2020, 08:19 PM
Replies: 3
Views: 78
Posted By Kwarde
Re: Help with kick command

That is usually correct. However, note that the "u" specificier in sscanf() returns INVALID_PLAYER_ID if the player is not connected. Otherwise it returns the ID of the first found player.
Forum: Scripting Help 15/05/2020, 08:07 PM
Replies: 7
Views: 117
Posted By Kwarde
Re: OnPlayerCommandPerformed

Yes. You will need Pawn.CMD tho.
And using above example, all you need to do is to add this line in your script to make the command unusable during duel:
flags:COMMAND_NAME(NO_USE_DUEL);
...
Forum: Scripting Help 15/05/2020, 07:57 PM
Replies: 7
Views: 117
Posted By Kwarde
Re: OnPlayerCommandPerformed

Ignore what GameOvr said. If there's a shitload of commands you'd compare for alot of strings which is pretty bad practice. For example, you want admins to be able to use admin commands in case...
Showing results 1 to 25 of 500

 

All times are GMT. The time now is 03:54 AM.


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