if(strcmp(cmd, "/disarm", true) == 0) // Reset the player's weapons
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
new giveplayerid;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayername[MAX_PLAYER_NAME];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "USAGE: /disarm [playername/id]");
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "FUNCTION: Will disarm the player.");
return 1;
}
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
GetPlayerName(playerid, sendername, sizeof(sendername));
ResetPlayerWeapons(giveplayerid);
format(string, sizeof(string), "-| Administrator %s disarmed %s |-",sendername, giveplayername);
ABroadCast(COLOR_YELLOW,string,1);
}
else if(giveplayerid == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_LIGHT_BLUE, string);
}
}
else SendClientMessage(playerid, COLOR_LIGHT_BLUE, "You are not an admin with the required level.");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
|
Originally Posted by `'DokerJr'`
the command is from SWR ?
|