06.07.2016, 14:02
Hi this script make on the server that : Server:Unkown Command but i have verified the command there is no error here is the code :
what's the matters ?
PHP код:
CMD:ar(playerid, params[])
{
if(PlayerInfo[playerid][pIGRD] < 1) return SendClientMessage(playerid, COULEUR_GRIS, "You are not authorized to use this command.");
SendAdminText(playerid, "/ar", params);
new giveplayerid, playername[64], giveplayer[64], string[120];
if(!IsPlayerAdmin(playerid)) return 0;
if (sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, 0xAA3333AA, "Usage: /ar [playerid]");
new giveplayerid1 = reporter[giveplayerid];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid1, giveplayer, MAX_PLAYER_NAME);
if(giveplayerid1 == -1) return SendClientMessage(playerid, 0xAA3333AA, "Error: That player did not report anyone now!");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xAA3333AA, "Error: User not online!");
if(!IsPlayerConnected(giveplayerid1)) return SendClientMessage(playerid, 0xAA3333AA, "Error: User not online!");
format(string, sizeof(string), "Your report on %s(%d) has been reviewed by %s(%d)", giveplayer, giveplayerid, playername, playerid);
SendClientMessage(giveplayerid, 0xAA3333AA, string);
SendClientMessage(playerid, 0xAA3333AA, "Spec the player who has been reported.");
return 1;
}
CMD:dr(playerid, params[])
{
if(PlayerInfo[playerid][pIGRD] < 1) return SendClientMessage(playerid, COULEUR_GRIS, "You are not authorized to use this command.");
SendAdminText(playerid, "/dr", params);
new giveplayerid, playername[64], giveplayer[64],reason[50], string[120];
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, 0xAA3333AA, "Usage: /dr [playerid] [reason]");
new giveplayerid1 = reporter[giveplayerid];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid1, giveplayer, MAX_PLAYER_NAME);
if(giveplayerid1 == -1) return SendClientMessage(playerid, 0xAA3333AA, "Error: That player did not report anyone now!");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xAA3333AA, "Error: User not online!");
if(!IsPlayerConnected(giveplayerid1)) return SendClientMessage(playerid, 0xAA3333AA, "Error: User not online!");
format(string, sizeof(string), "Your report on %s(%d) has been declined by %s(%d), reason: %s", giveplayer, giveplayerid1, playername, playerid, reason);
SendClientMessage(giveplayerid, 0xAA3333AA, string);
reporter[giveplayerid] = -1;
return 1;
}
CMD:tr(playerid, params[])
{
if(PlayerInfo[playerid][pIGRD] < 1) return SendClientMessage(playerid, COULEUR_GRIS, "You are not authorized to use this command.");
SendAdminText(playerid, "/tr",params);
new giveplayerid, playername[64], giveplayer[64], string[120];
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(params, "us[128]", giveplayerid)) return SendClientMessage(playerid, 0xAA3333AA, "Usage: /tr [playerid]");
new giveplayerid1 = reporter[giveplayerid];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid1, giveplayer, MAX_PLAYER_NAME);
if(giveplayerid1 == -1) return SendClientMessage(playerid, 0xAA3333AA, "Error: That player did not report anyone now!");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xAA3333AA, "Error: User not online!");
if(!IsPlayerConnected(giveplayerid1)) return SendClientMessage(playerid, 0xAA3333AA, "Error: User not online!");
format(string, sizeof(string), "Your report on %s(%d) has been declined by %s(%d)", giveplayer, giveplayerid1, playername, playerid);
SendClientMessage(giveplayerid, 0xAA3333AA, string);
reporter[giveplayerid] = -1;
return 1;
}