i had like wat the fuck? -
MojorX - 19.10.2015
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.
Re: i had like wat the fuck? -
Sudaisx - 19.10.2015
It might be already defined in ur gamemode
Re: i had like wat the fuck? -
MojorX - 19.10.2015
i maded IRC pwn by my self, and i puted a cmd
PHP код:
IRCCMD:ban(botid, channel[], user[], host[], params[])
{
// Check if the user is at least an op in the channel
if (IRC_IsOp(botid, channel, user))
{
new playerid, reason[64];
// Check if the user at least entered a player ID
if (sscanf(params, "dS(No reason)[64]", playerid, reason))
{
return 1;
}
// Check if the player is connected
if (IsPlayerConnected(playerid))
{
// Echo the formatted message
new msg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has been banned by %s on IRC. (%s)", name, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", name, user, reason);
SendClientMessageToAll(0x0000FFFF, msg);
// Ban the player
BanEx(playerid, reason);
}
}
return 1;
}
And there is sscanf and i did #include <sscanf>
i made a other command
PHP код:
IRCCMD:slap(botid, channel[], user[], host[], params[])
{
new playerid, reason[64];
new player1;
//Playerid
if (sscanf(params, "dS(No reason.)[64]", playerid, reason))
{
return 1;
}
if (IRC_IsVoice(botid, channel, user))
{
if(IsPlayerConnected(playerid))
{
new msg[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s", pname, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s", pname, user, reason);
SendClientMessageToAll(0xFF0000C8, msg);
new Float:Health;
new Float:x, Float:y, Float: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;
}
Re: i had like wat the fuck? -
MojorX - 19.10.2015
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>
Re: i had like wat the fuck? -
kristo - 19.10.2015
sscanf plugin only needs one include. Delete the one below the other, it's deprecated.
Re: i had like wat the fuck? -
MojorX - 20.10.2015
But, then why the fuck noone of my maded command don't work? works only !players !say and !asay
Re: i had like wat the fuck? -
jlalt - 20.10.2015
Stop swear kid, show me your !players command and i gonna fix this both
Re: i had like wat the fuck? -
MojorX - 20.10.2015
PHP код:
IRCCMD:players( botid, channel[], user[], host[], params[] )
{
new tempstr[128], string[200], count, name[24];
for( new i ,slots = GetMaxPlayers(); i < slots; i++ )
{
if(IsPlayerConnected(i))
{
count++;
GetPlayerName(i, name, sizeof(name));
format(tempstr, sizeof(tempstr), "%s , %s", tempstr, name);
}
}
if(count)
{
format(string, sizeof(string), "Connected Players[%d/%d]:- %s", count, GetMaxPlayers(), tempstr);
IRC_Say(botid, channel, string);
} else IRC_Say(botid, channel, "No players are online.");
return 1;
}
This is my !players cmd
Re: i had like wat the fuck? -
jlalt - 21.10.2015
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(botid, channel[], user[], host[], params[])
{
// Check if the user is at least an op in the channel
if (IRC_IsOp(botid, channel, user))
{
new player1,reason[64];
// Check if the user at least entered a player ID
if (sscanf(params, "dS(No reason)[64]", player1, reason))
{
return 1;
}
// Check if the player is connected
if (IsPlayerConnected(player1))
{
// Echo the formatted message
new msg[128], name[MAX_PLAYER_NAME];
GetPlayerName(player1, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has been banned by %s on IRC. (%s)", name, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been banned by %s on IRC. (%s)", name, user, reason);
SendClientMessageToAll(0x0000FFFF, msg);
// Ban the player
BanEx(player1, reason);
}
}
return 1;
}
IRCCMD:slap(botid, channel[], user[], host[], params[])
{
new player1, reason[64];
//Playerid
if (sscanf(params, "dS(No reason.)[64]", player1, reason))
{
return 1;
}
if (IRC_IsVoice(botid, channel, user))
{
if(IsPlayerConnected(player1))
{
new msg[128], pname[MAX_PLAYER_NAME];
GetPlayerName(player1, pname, sizeof(pname));
format(msg, sizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s", pname, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s", pname, user, reason);
SendClientMessageToAll(0xFF0000C8, msg);
new Float:Health;
new Float:x, Float:y, Float: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;
}