10.12.2012, 13:28
hey everyone,
these commands dont work anymore, i have them in my IRC script, and when i do !say text, it just works, but when i do !givecar or !flip or any of these, it doesnt works... and they did before, i just had the irc script unused for some time i think about 2 months, and now i put them back in there but they dont work...
anyone has an idea of why they dont work and how to fix it?
greets niels
pawn Код:
IRCCMD:warn(botid, channel[], user[], host[], params[])
{
// Check if the user is at least a halfop 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 IRC_GroupSay(groupID, channel, "Syntax: !warn playerid reason");
// Check if the player is connected
if (IsPlayerConnected(playerid))
{
// warns the player
// Echo the formatted message
new msg[128], name[MAX_PLAYER_NAME];
Warns[playerid]++;
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has been warned by %s on IRC.(warning: %d/3) (Reason: %s)", name, user, Warns[playerid],reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been warned by %s on IRC.(warning: %d/3) (Reason: %s)", name, user, Warns[playerid],reason);
SendClientMessageToAll(0x0000FFFF, msg);
if(Warns[playerid] == MAX_WARNINGS)
{
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has been kicked by %s on IRC. reason: warning 3/3", name, user);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been warned by %s on IRC. reason: warning 3/3", name, user);
SendClientMessageToAll(0x0000FFFF, msg);
Kick(playerid);
}
}
}
return 1;
}
IRCCMD:repair(botid, channel[], user[], host[], params[])
{
// Check if the user is at least a halfop in the channel
if (IRC_IsOp(botid, channel, user))
{
new playerid;
// Check if the user at least entered a player ID
if (sscanf(params, "d", playerid)) return IRC_GroupSay(groupID, channel, "Syntax: !repair playerid");
// Check if the player is connected
if (IsPlayerConnected(playerid))
{
// warns the player
// Echo the formatted message
if(IsPlayerInAnyVehicle(playerid))
{
new msg[128], name[MAX_PLAYER_NAME];
Warns[playerid]++;
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has repaired %s's vehicle on IRC.", user, name);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has repaired %s's vehicle on IRC.", user, name);
SendClientMessageToAll(0x0000FFFF, msg);
RepairVehicle(playerid);
}
else return IRC_GroupSay(groupID, IRC_CHANNEL, "This player isn't in a vehicle");
}
}
return 1;
}
IRCCMD:flip(botid, channel[], user[], host[], params[])
{
// Check if the user is at least a halfop in the channel
if (IRC_IsOp(botid, channel, user))
{
new playerid;
// Check if the user at least entered a player ID
if (sscanf(params, "d", playerid)) return IRC_GroupSay(groupID, channel, "Syntax: !flip playerid");
// Check if the player is connected
if (IsPlayerConnected(playerid))
{
// warns the player
// Echo the formatted message
if(IsPlayerInAnyVehicle(playerid))
{
new msg[128], name[MAX_PLAYER_NAME];
Warns[playerid]++;
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has flipped %s's vehicle on IRC.", user, name);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has flipped %s's vehicle on IRC.", user, name);
SendClientMessageToAll(0x0000FFFF, msg);
FlipVehicle(playerid);
}
else return IRC_GroupSay(groupID, channel, "This player isn't in a vehicle");
}
}
return 1;
}
IRCCMD:givecar(botid, channel[], user[], host[], params[])
{
// Check if the user is at least a halfop in the channel
if (IRC_IsOp(botid, channel, user))
{
new playerid;
// Check if the user at least entered a player ID
if (sscanf(params, "d", playerid)) return IRC_GroupSay(groupID, channel, "Syntax: !givecar playerid");
// Check if the player is connected
if (IsPlayerConnected(playerid))
{
// warns the player
// Echo the formatted message
if(!IsPlayerInAnyVehicle(playerid))
{
new msg[128], name[MAX_PLAYER_NAME];
Warns[playerid]++;
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "02*** %s has given %s a car on IRC.", user, name);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has given %s a car on IRC.", user, name);
SendClientMessageToAll(0x0000FFFF, msg);
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
PutPlayerInVehicle(playerid, CreateVehicle(411, x, y, z, a, -1, -1, 50), 0);
SendClientMessage(playerid, 0x00FF00FF, "Enjoy your new car");
}
else return IRC_GroupSay(groupID, channel, "this player already has a Vehicle");
}
}
return 1;
}
IRCCMD:kick(botid, channel[], user[], host[], params[])
{
// Check if the user is at least a halfop in the channel
if (IRC_IsHalfop(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 IRC_GroupSay(groupID, channel, "Syntax: !kick playerid reason");
// 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 kicked by %s on IRC. (%s)", name, user, reason);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
SendClientMessageToAll(0x0000FFFF, msg);
// Kick the player
Kick(playerid);
}
}
return 1;
}
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 IRC_GroupSay(groupID, channel, "Syntax: !ban playerid reason");
// 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;
}
anyone has an idea of why they dont work and how to fix it?
greets niels