Posts: 2,421
Threads: 52
Joined: Mar 2009
Reputation:
0
I was just thinking if ReturnPlayerName(playerb) is passed a name it wont return the players name it will fail. sorry it didnt help.
Posts: 178
Threads: 31
Joined: Jun 2009
Reputation:
0
I don't really know what's wrong with it, seems to be fine for me... but well, it's not :S
Posts: 2,938
Threads: 162
Joined: May 2010
mama mama ma mama mama ma ma my murda
pawn Код:
CMD:wh(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(!PlayerInfo[playerid][pLogged]) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You need to be logged in to excute a command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are not an admin.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /wh [id]");
new message[128];
if(GetPlayerWeapon(playerb) != PlayerInfo[playerb][pWeapon1]) return SendClientMessage(playerid, COLOR_YELLOW, "Anti-WH: Weapon is not in Slot 1.");
if(GetPlayerWeapon(playerb) != PlayerInfo[playerb][pWeapon2]) return SendClientMessage(playerid, COLOR_YELLOW, "Anti-WH: Weapon is not in Slot 2.");
if(GetPlayerWeapon(playerb) != PlayerInfo[playerb][pWeapon3]) return SendClientMessage(playerid, COLOR_YELLOW, "Anti-WH: Weapon is not in Slot 3.");
format(message, sizeof(message), "Anti-WH: %s was checked for Weapon Hacks.", ReturnPlayerName(playerb));
SendClientMessageToAll(COLOR_YELLOW, message);
}
return 1;
}
Posts: 2,938
Threads: 162
Joined: May 2010
this esle its ur playerinfo
pawn Код:
CMD:wh(playerid, params[])
{
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /wh [id]");
if(!PlayerInfo[playerid][pLogged]) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You need to be logged in to excute a command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are not an admin.");
if(IsPlayerConnected(playerb))
{
new message[128];
if(GetPlayerWeapon(playerb) != PlayerInfo[playerb][pWeapon1]) return SendClientMessage(playerid, COLOR_YELLOW, "Anti-WH: Weapon is not in Slot 1.");
if(GetPlayerWeapon(playerb) != PlayerInfo[playerb][pWeapon2]) return SendClientMessage(playerid, COLOR_YELLOW, "Anti-WH: Weapon is not in Slot 2.");
if(GetPlayerWeapon(playerb) != PlayerInfo[playerb][pWeapon3]) return SendClientMessage(playerid, COLOR_YELLOW, "Anti-WH: Weapon is not in Slot 3.");
format(message, sizeof(message), "Anti-WH: %s was checked for Weapon Hacks.", ReturnPlayerName(playerb));
SendClientMessageToAll(COLOR_YELLOW, message);
}
return 1;
}
Posts: 2,938
Threads: 162
Joined: May 2010
haha^ well dudits it works? else its ur playerinfo