SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 171
Search took 0.01 seconds.
Search: Posts Made By: ShadowMortar
Forum: Scripting Help 09/04/2020, 08:44 PM
Replies: 5
Views: 66
Posted By ShadowMortar
Re: What is the best way to decide string size?

This was actually helpful, thanks.
I have one more question:
How do I then declare string size if I am fetching data from database? Let's take example 'dynamic' entrance system. Not every...
Forum: Scripting Help 09/04/2020, 08:29 PM
Replies: 5
Views: 66
Posted By ShadowMortar
Re: What is the best way to decide string size?

That is exactly what I am trying to ask, as I don't want to use PawnPlus ( dynamic strings ).
Forum: Scripting Help 09/04/2020, 08:23 PM
Replies: 5
Views: 66
Posted By ShadowMortar
What is the best way to decide string size?

What is the best way to decide the string size? Perhaps, not using size 500 when I myself know is more than enough...
Is this good way to do that so?:


CMD:testcmd( playerid ) {
new first =...
Forum: Scripting Help 09/04/2020, 07:34 AM
Replies: 9
Views: 101
Posted By ShadowMortar
Re: Prevent Damage

You can use
https://forum.sa-mp.com/showthread.php?t=563387
And returning 0 will automatically prevent from giving damage.
(As far as I remember)
Forum: Scripting Help 06/04/2020, 08:55 PM
Replies: 23
Views: 296
Posted By ShadowMortar
Re: how to recopilate?

/*Use this one below if you are using foreach:*/
new Kills[ MAX_PLAYERS ] = { 0, ... };
CMD:kills( playerid ) {
new name[ 25 ];
foreach( new i: Player ) GetPlayerName( i, name, sizeof( name )...
Forum: Scripting Help 06/04/2020, 01:04 PM
Replies: 9
Views: 209
Posted By ShadowMortar
Re: A vehicle for only one person !

However he should also make a check if player's new state is driver, because TP hackers can bypass it.
Forum: Gamemode Scripts 06/04/2020, 11:53 AM
Replies: 12
Views: 824
Posted By ShadowMortar
Re: Trigger Time Battlegrounds [DM/Battleground]

The way you wrote the small introduction to the script made me actually reply.
First:

What ever the f**k, you made the script out of boredom or not, this might slightly offend someone, I don't...
Forum: Scripting Help 04/04/2020, 09:03 AM
Replies: 4
Views: 81
Posted By ShadowMortar
Re: Iterator vehicles

Here is a tutorial
> https://forum.sa-mp.com/showthread.php?t=570937
Forum: Scripting Help 04/04/2020, 09:01 AM
Replies: 3
Views: 74
Posted By ShadowMortar
Re: Dialog

new PlayerSelectedPlayer[ MAX_PLAYERS ] [ MAX_PLAYERS ];
CMD:listplayers( playerid ) {
new tmp[ 50 ], str[ 300 ], name[ MAX_PLAYER_NAME+1 ], count;
foreach( new i: Player ) { //Loop through all...
Forum: Scripting Help 04/04/2020, 08:49 AM
Replies: 4
Views: 81
Posted By ShadowMortar
Re: Iterator vehicles

Instead of normal for new loops, use foreach.
So use foreach to loop through the iterator and instead of "Iter_Remove", use "Iter_SafeRemove", either way there will be conflicts.
Forum: Scripting Help 03/04/2020, 09:32 PM
Replies: 5
Views: 78
Posted By ShadowMortar
Re: PawnPlus

We can't know if you don't provide any code... We aren't magicians..
Forum: Scripting Help 03/04/2020, 08:43 PM
Replies: 5
Views: 78
Posted By ShadowMortar
Re: PawnPlus

I am guessing that he is trying to say that after he uses tasks from PawnPlus, his server crashes...
However, I'm not experienced in PawnPlus, I know what I would do first, check for warnings on...
Forum: Scripting Help 03/04/2020, 08:38 PM
Replies: 1
Views: 89
Posted By ShadowMortar
Re: how to optimize?

UpdatePlayerData(playerid, reason)
{
if (Player[playerid][IsLoggedIn] == false) return 0;

if (reason == 1)
{
GetPlayerPos(playerid, Player[playerid][X_Pos],...
Forum: Scripting Help 28/03/2020, 06:09 PM
Replies: 16
Views: 180
Posted By ShadowMortar
Re: MySQL R39-6 reading data from a row

I am not sure if there's any 'way' to make the saving system using > SELECT <.
Are you maybe looking for this:

format( query, sizeof( query ), "SELECT * FROM `TABLE` WHERE `ID` = '%d'", SQLID );...
Forum: Scripting Help 27/03/2020, 03:15 PM
Replies: 6
Views: 161
Posted By ShadowMortar
Re: how to define the killerid/issuerid here

public OnPlayerDeath( playerid, killerid reason ) { // Callback that gets executed after player has been killed/died
if(killerid != INVALID_PLAYER_ID) { // If the player was not killed by...
Forum: Scripting Help 27/03/2020, 01:17 PM
Replies: 4
Views: 86
Posted By ShadowMortar
Re: error 029 invalid expression

I would use CreateDynamic3DTextLabel, so you do not have to use Attach3dTextLabelToPlayer.
So basically:

new Text3D:label[ MAX_PLAYERS ]; //Define dynamic 3D text label

label[ playerid ] =...
Forum: Scripting Help 27/03/2020, 09:13 AM
Replies: 1
Views: 60
Posted By ShadowMortar
Re: help with invalid subscript

HouseInfo is the name of enumator, that's why you are getting an error, ex below:


#define MAX_HOUSES ( 1000 )
enum HouseInfo {
Houseid,
Owned,
Owner[ MAX_PLAYER_NAME+1 ]
};
new hInfo[...
Forum: Screenshots and Videos 27/03/2020, 09:00 AM
Replies: 7
Views: 546
Posted By ShadowMortar
Re: Admin Panel [ TEXTDRAWS ]

I understand this language, and if you look closer, you would see on top "Igraci" which means "Players", then "Admini" which means "Admins", then "Vipovi" which means "Vips", then "Promoteri" which...
Forum: Scripting Help 26/03/2020, 07:51 PM
Replies: 18
Views: 218
Posted By ShadowMortar
Re: Faction System

INT stands for integer ( 0, 1, 2, 3...)
FLOAT is approximate number data type ( 5.3, 99.19, 300.20... )
VARCHAR is character data which can contain numbers, letters and special characters(...
Forum: Scripting Help 26/03/2020, 07:18 PM
Replies: 5
Views: 112
Posted By ShadowMortar
Re: lock /unlock

Sorry, I am not santa claus, I literally made an example with explanation, with the example make what you need :D
Forum: Scripting Help 26/03/2020, 07:14 PM
Replies: 18
Views: 218
Posted By ShadowMortar
Re: Faction System

Run a simple query through phpmyadmin
CREATE TABLE IF NOT EXISTS `organizacije`( `ID` INT(10) NOT NULL UNIQUE, `tip` INT(10) NOT NULL, `int` INT(10), `rank1` VARCHAR(40) NOT NULL, `rank2`...
Forum: Scripting Help 26/03/2020, 10:58 AM
Replies: 4
Views: 111
Posted By ShadowMortar
Re: Tip for fast convert GAMEMODE INI to SQL

Yep, you can try SQLite.
> https://forum.sa-mp.com/showthread.php?t=477025
The download link available:
> https://www.solidfiles.com/v/82M3BqQ8k7GZB
Forum: Scripting Help 26/03/2020, 10:52 AM
Replies: 6
Views: 171
Posted By ShadowMortar
Re: Why this timers doesn't work?

sbs_timer[playerid] = SetTimerEx("sbsTimer", 1200000, false, "d", playerid);
The timer should be called only once in 20 minutes, as you've set the repeating parameter to false....
Forum: Scripting Help 26/03/2020, 10:47 AM
Replies: 5
Views: 99
Posted By ShadowMortar
Re: Anti cheat ?

You can convert it to per player timer if necessarily needed.
Forum: Scripting Help 26/03/2020, 10:43 AM
Replies: 5
Views: 112
Posted By ShadowMortar
Re: lock /unlock

new bool:VehicleLocked[ MAX_VEHICLES ] = { false, ... }; // Variable to check either the vehicle is locked or not

CMD:lockvehicle( playerid ) { // Command which locks the vehicle
new VehicleID =...
Showing results 1 to 25 of 171

 

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


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