News A server update was released on July 20. Server patch notes and downloads are here. Additionally, a client update was released on the same day. Client patch notes are here.
Recent Posts
2
Code: [Select]
if ( a == 1 ) Message( "** 5 Clan's with top kills:" );
                    if ( a == 1 ) (Clan) ? Message( ">> 1. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 1. Position Empty" );
                    else if ( a == 2 ) (Clan) ? Message( ">> 2. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 2. Position Empty" );
                    else if ( a == 3 ) (Clan) ? Message( ">> 3. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 3. Position Empty" );
                    else if ( a == 4 ) (Clan) ? Message( ">> 4. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 4. Position Empty" );
                    else if ( a == 5 ) (Clan) ? Message( ">> 5. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 5. Position Empty" );
dafuq did I just see?
Code: [Select]
if( a >= 1 )
Message( Clan ? format( ">> %i . %s with %i Kills. Ratio: %.2f", a, Clan, Ratio ) : "**" + a + ". Position Empty." );
3
If you're going to limit by 6, you're not going to always get 1 result. You'd get max 6.

So go over your code and fix it yourself.
4
Servers / Re: Vice Racing
« Yesterday at 09:22 PM by Shadow »
Decided to go open-source.


Feel free to use the source of this project. It is currently available at https://bitbucket.org/shadow6432/vc-mp-racing-server-module-0.4 . I won't have much time to develop it and make tracks for it so it's quite a giveaway for anyone who understands some C++.

This sadly marks the end of this project, or the indefinite postponement of it. This topic might be moved to community plugins section.
5
No error and nothing its returning
Code: [Select]
else if ( cmd == "clanrank" )
        {
        if ( RegisteredClans() > 5 ) Message( "** Sorry, the server need min. 5 clans registed from a table of rankings" );
            else
            {
                local Limit = 6, a = 1;
                local q = ::mysql_query( sDB, "SELECT Clan, Kills, Deaths FROM ClanStats ORDER BY Kills DESC LIMIT " + Limit );
               
                if( ::mysql_num_rows( q ) == 1 ){
                local result = ::mysql_fetch_assoc( q );
                local Clan;
                while ( a < Limit )
                {
local Clan = Name = result[ "Name" ].tostring(), Kills = Kills = result[ "Kills" ].tofloat(), Deaths = Deaths = result[ "Deaths" ].tofloat(), Ratio;
                    if ( ( Kills > 0 ) && ( Deaths > 0 ) ) Ratio = Kills / Deaths;
                    else Ratio = 0;
                    Ratio = format ( "%.2f", Ratio );
 
                    if ( a == 1 ) Message( "** 5 Clan's with top kills:" );
                    if ( a == 1 ) (Clan) ? Message( ">> 1. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 1. Position Empty" );
                    else if ( a == 2 ) (Clan) ? Message( ">> 2. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 2. Position Empty" );
                    else if ( a == 3 ) (Clan) ? Message( ">> 3. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 3. Position Empty" );
                    else if ( a == 4 ) (Clan) ? Message( ">> 4. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 4. Position Empty" );
                    else if ( a == 5 ) (Clan) ? Message( ">> 5. " + Clan + " with " + Kills + " kills - Ratio: " + Ratio ) : Message( "** 5. Position Empty" );
                    a ++;
                }
        mysql_free_result( q );
            }             
        }
        }
6
SLC's Squirrel Plugin / [CHANGELOG] Re: Noteworthy changes in the plugin.
« Yesterday at 06:39 PM by happymint »
The previous event system was replaced by a signals and slots implementation to allow the scripter to bind more than one listener/callback to a certain event. So what's changed in the syntax compared to the previous ones?

Well, If previously you would've listened to the `player message` event like this:
Code: [Select]
player.Bind(SqEvent.PlayerMessage, this, function(mesage) {
    print(message);
});

Now you can do it like this:
Code: [Select]
player.On.Message.Connect(this, function(mesage) {
    print(message);
});

The `this` parameter is now optional. If you don't specify it then it defaults to the root table.

And this is not just some syntax sugar. This implementation allows you to connect multiple functions to the same event. For example:
Code: [Select]
SqCore.On().PlayerCreated.Connect(function(player, header, payload) {

    player.On.Message.Connect(player, function(message) {
        printf("%s said '%s'", this.Name, message);
    });

    player.On.Message.Connect(function(message) {
        printf("are you sure he said said '%s' ?", message);
    });

    player.On.Message.Connect(function(message) {
        printf("yes, he said '%s'", message);
    });

});

Outputting something like this https://s21.postimg.org/jwyr3cp53/Untitled.png
Code: [Select]
[USR] SLC said 'ftw biatch'
[USR] are you sure he said said 'ftw biatch' ?
[USR] yes, he said 'ftw biatch'

When you want to listen to an event globally, you use it like this:
Code: [Select]
SqCore.On().PlayerMessage.Connect(function(player, message) {
    printf("%s said '%s'", this.Name, message);
});

Please note the parentheses after `On`. That's because the events are returned by a function. When you're using the events directly on the entity itself. You don't need them as they act like a property.

In fact, that's just a table of `SqSignal` instances. That means in order to get a list of them you can use a for loop.
Code: [Select]
foreach (name, signal in SqCore.On()) {
    print(name);
}

Which outputs a list of all the signals/events that can be accessed. And the same applies to the entities:
Code: [Select]
foreach (name, signal in someplayer.On) {
    print(name);
}

And because that's just a table. that means you can insert your own events/signals and make them look like they're a part of the module itself.

For example, to create an event/signal for a certain player:
Code: [Select]
player.On.MyEventName <- SqCreateSignal();

And now you can connect to it like any normal event. Except you're the one that has to emit that event/signal manually (obviously):
Code: [Select]
player.On.MyEventName.Emit(parameters, go, here);

And the same works with global signals:
Code: [Select]
SqCore.On().MyEventName <- SqCreateSignal();

This works perfectly fine because it's just a table. However, you should be careful not to remove or modify the built in events from that table. Because there's nothing preventing you from doing that. So you'll find your self unable to receive that particular event. Unless you back it up to some other place.



The routines implementation was also changed. Previously you would create routines like:
Code: [Select]
SqRoutine.Create(...);

Now you can do it just with:
Code: [Select]
SqRoutine(...);

There are also some other changes and improvements but I won't get into them right now.



Binary Status: available
7
Servers / America Roleplay
« Yesterday at 05:50 PM by kennedyarz »


America Roleplay. It is a server based on real life mode, the citizen must work hard to be able to have his tastes by buying Autos Houses etc ...

Jobs List:

- Garbageman
- Police
- Pizza boy
- Drug dealer
- Courier
- Mechanic
- Paramedic


Server Ip: 138.197.43.3:8192
Irc: LUNet #AR
Forum
Help

Captures
(click to show/hide)










8
Yep Its really hard to type from phone And Thanks its solved it Btw this small mistake waste my 6 hours before posting here i tried many times to solve it :P
I am not locking this topic if i got some problem i will post here because i dont want to create more threads
9
I did System load vehicles, Addcar, ChangeCol and SavePos
http://forum.vc-mp.org/?topic=3499.0
10
change that if mysql num rows to check 1 instead of 0.
so, it should be: if( mysql_num_rows( dos)  == 1) //Do shits here...
off: Irs really shit to type from a phone :D