i had like wat the fuck?
#1

C:\Users\Adzis\Desktop\Server 2\pawno\include\sscanf.inc(2 : error 021: symbol already defined: "unformat"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

It might be already defined in ur gamemode
Reply
#3

i maded IRC pwn by my self, and i puted a cmd


PHP код:
IRCCMD:ban(botidchannel[], user[], host[], params[])
{
    
// Check if the user is at least an op in the channel
    
if (IRC_IsOp(botidchanneluser))
    {
        new 
playeridreason[64];
        
// Check if the user at least entered a player ID
        
if (sscanf(params"dS(No reason)[64]"playeridreason))
        {
            return 
1;
        }
        
// Check if the player is connected
        
if (IsPlayerConnected(playerid))
        {
            
// Echo the formatted message
            
new msg[128], name[MAX_PLAYER_NAME];
            
GetPlayerName(playeridnamesizeof(name));
            
format(msgsizeof(msg), "02*** %s has been banned by %s on IRC. (%s)"nameuserreason);
            
IRC_GroupSay(groupIDchannelmsg);
            
format(msgsizeof(msg), "*** %s has been banned by %s on IRC. (%s)"nameuserreason);
            
SendClientMessageToAll(0x0000FFFFmsg);
            
// Ban the player
            
BanEx(playeridreason);
        }
    }
    return 
1;

And there is sscanf and i did #include <sscanf>


i made a other command

PHP код:
IRCCMD:slap(botidchannel[], user[], host[], params[])
{
        new 
playeridreason[64];
        new 
player1;
        
//Playerid
        
if (sscanf(params"dS(No reason.)[64]"playeridreason))
        {
                return 
1;
        }
    if (
IRC_IsVoice(botidchanneluser))
        {
                if(
IsPlayerConnected(playerid))
                {
                        new 
msg[128], pname[MAX_PLAYER_NAME];
                        
GetPlayerName(playeridpnamesizeof(pname));
                        
format(msgsizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s"pnameuserreason);
                        
IRC_GroupSay(groupIDchannelmsg);
                        
format(msgsizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s"pnameuserreason);
                        
SendClientMessageToAll(0xFF0000C8msg);
                        new 
Float:Health;
                        new 
Float:xFloat:yFloat:z;
                        
GetPlayerHealth(player1,Health);
                        
SetPlayerHealth(player1,Health-25);
                        
GetPlayerPos(player1,x,y,z);
                        
SetPlayerPos(player1,x,y,z+7);
                        
PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
                        
PlayerPlaySound(player1,1190,0.0,0.0,0.0);
                }
        }
        return 
1;

Reply
#4

Quote:
Originally Posted by GreenHaze
Посмотреть сообщение
Try erasing the line, you probably have it twice.
PHP код:
#include <a_samp>
// irc.inc from this package
#include <irc>
// sscanf2.inc from the sscanf plugin
#include <sscanf2>
// sscanf.inc from the sscanf plugin
#include <sscanf> 
Reply
#5

sscanf plugin only needs one include. Delete the one below the other, it's deprecated.
Reply
#6

But, then why the fuck noone of my maded command don't work? works only !players !say and !asay
Reply
#7

Stop swear kid, show me your !players command and i gonna fix this both
Reply
#8

PHP код:
IRCCMD:playersbotidchannel[], user[], host[], params[] )
{
    new 
tempstr[128], string[200], countname[24];
    for( new 
,slots GetMaxPlayers(); slotsi++ )
    {
        if(
IsPlayerConnected(i))
        {
            
count++;
            
GetPlayerName(inamesizeof(name));
            
format(tempstrsizeof(tempstr), "%s , %s"tempstrname);
        }
    }
    if(
count)
    {
        
format(stringsizeof(string), "Connected Players[%d/%d]:- %s"countGetMaxPlayers(), tempstr);
        
IRC_Say(botidchannelstring);
    } else 
IRC_Say(botidchannel"No players are online.");
    return 
1;


This is my !players cmd
Reply
#9

You used playerid in sscanf but for commands player1 o.O just remove playerid and put player1 in sscanf like the below

PHP код:
IRCCMD:ban(botidchannel[], user[], host[], params[]) 

    
// Check if the user is at least an op in the channel 
    
if (IRC_IsOp(botidchanneluser)) 
    { 
        new 
player1,reason[64]; 
        
// Check if the user at least entered a player ID 
        
if (sscanf(params"dS(No reason)[64]"player1reason)) 
        { 
            return 
1
        } 
        
// Check if the player is connected 
        
if (IsPlayerConnected(player1)) 
        { 
            
// Echo the formatted message 
            
new msg[128], name[MAX_PLAYER_NAME]; 
            
GetPlayerName(player1namesizeof(name)); 
            
format(msgsizeof(msg), "02*** %s has been banned by %s on IRC. (%s)"nameuserreason); 
            
IRC_GroupSay(groupIDchannelmsg); 
            
format(msgsizeof(msg), "*** %s has been banned by %s on IRC. (%s)"nameuserreason); 
            
SendClientMessageToAll(0x0000FFFFmsg); 
            
// Ban the player 
            
BanEx(player1reason); 
        } 
    } 
    return 
1
}  
IRCCMD:slap(botidchannel[], user[], host[], params[]) 

        new 
player1reason[64]; 
        
//Playerid 
        
if (sscanf(params"dS(No reason.)[64]"player1reason)) 
        { 
                return 
1
        } 
    if (
IRC_IsVoice(botidchanneluser)) 
        { 
                if(
IsPlayerConnected(player1)) 
                { 
                        new 
msg[128], pname[MAX_PLAYER_NAME]; 
                        
GetPlayerName(player1pnamesizeof(pname)); 
                        
format(msgsizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s"pnameuserreason); 
                        
IRC_GroupSay(groupIDchannelmsg); 
                        
format(msgsizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s"pnameuserreason); 
                        
SendClientMessageToAll(0xFF0000C8msg); 
                        new 
Float:Health
                        new 
Float:xFloat:yFloat:z
                        
GetPlayerHealth(player1,Health); 
                        
SetPlayerHealth(player1,Health-25); 
                        
GetPlayerPos(player1,x,y,z); 
                        
SetPlayerPos(player1,x,y,z+7); 
                        
PlayerPlaySound(player1,1190,0.0,0.0,0.0); 
                } 
        } 
        return 
1

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)