#1

PHP код:
COMMAND:factions(playeridparams[])
{
    new 
iCount;
    
FactionLoop(f)
    {
        if(
FactionInfo[f][fActive] != true) continue;
        
iCount++;
    }
    
    if(
iCount == 0) return SendClientMessage(playerid0xFFFFFFFF"There are currently no active factions in the server!");
    
FactionLoop(f)
    {
        if(
FactionInfo[f][fActive] != true) continue;
        
        
SendClientMSG(playeridFactionInfo[f][fColour], " - %s | Online: %d | Members: %d / %d"FactionInfo[f][fName], GetOnlineMembers(f), GetTotalMembers(f), FactionInfo[f][fMaxMemberSlots]);
        
printf("%s",FactionInfo[f][fName]);
    }
    return 
1;

Well, that used to work earlier. This sends a "-" in the name of the faction, but in printing it prints correct. The name doesnt gets formatted
Reply
#2

show sendclientmsg func
Reply
#3

Not only in this part, it is acting like that in many places.
PHP код:
stock SendClientMSG(playeridcolorfstring[], {Float_}:...)
{
    
#define BYTES_PER_CELL 4
    
static const
        
STATIC_ARGS 3;
    new 
= (numargs() - STATIC_ARGS) * BYTES_PER_CELL;
    if (
n)
    {
        new 
message[128], arg_startarg_end;
        
#emit CONST.alt        fstring
        #emit LCTRL          5
        #emit ADD
        #emit STOR.S.pri       arg_start
        #emit LOAD.S.alt       n
        #emit ADD
        #emit STOR.S.pri       arg_end
        
do
        {
            
#emit LOAD.I
            #emit PUSH.pri
            
arg_end -= BYTES_PER_CELL;
            
#emit LOAD.S.pri     arg_end
        
}
        while (
arg_end arg_start);
        
#emit PUSH.S         fstring
        #emit PUSH.C         128
        #emit PUSH.ADR        message
        
+= BYTES_PER_CELL 3;
        
#emit PUSH.S         n
        #emit SYSREQ.C        format
        
+= BYTES_PER_CELL;
        
#emit LCTRL          4
        #emit LOAD.S.alt       n
        #emit ADD
        #emit SCTRL          4
        
return SendPlayerMessage(playeridcolormessage"");
    }
    else return 
SendPlayerMessage(playeridcolorfstring"");

EDIT: The problem is lying in this stock
Reply
#4

Fixed. Replaced this stock by another
Reply
#5

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
stock
https://sampforum.blast.hk/showthread.php?tid=570635 - that's like the third time I'm giving you this link because I assume you haven't even opened it yet
Reply
#6

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=570635 - that's like the third time I'm giving you this link because I assume you haven't even opened it yet
That thread is complete bullshit. Using stock inside is actually worth it. If the programmer (scripter in this community) forgot to use this function (talking about big projects ad involving debugging stages) the stock key word helps in removing garbage collection to compiled pcode.In other words, using stock is sometimes useful.And is also something one should not care about that much.But calling functions stocks are idiotic though.
Reply
#7

Quote:
Originally Posted by GhostHacker9
Посмотреть сообщение
Using stock inside is actually worth it. If the programmer (scripter in this community) forgot to use this function
If someone "forgot" it then it means the function wasn't needed at all and it shouldn't be there.
Reply
#8

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
If someone "forgot" it then it means the function wasn't needed at all and it shouldn't be there.
that's why explicitly said "Debugging Stage" .And what even the advantage of not having them? care to explain? lol
Reply
#9

If you're not going to use the function right now, why not just comment it out then? xD
Reply
#10

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
If you're not going to use the function right now, why not just comment it out then? xD
that's not the point in there.Having or not having stock modifier is not going to affect any shit.I have to agree with Ghosthacker9 with that fact.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)