mirror of
				https://github.com/Resxt/Plutonium-T6-Scripts.git
				synced 2025-10-30 17:36:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			755 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			755 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #include scripts\chat_commands;
 | |
| 
 | |
| Init()
 | |
| {
 | |
|     CreateCommand(level.chat_commands["ports"], "notarget", "function", ::NoTargetCommand, 3, array("default_help_one_player"), array("ignoreme", "ignore"));
 | |
| }
 | |
| 
 | |
| 
 | |
| 
 | |
| /* Command section */
 | |
| 
 | |
| NoTargetCommand(args)
 | |
| {
 | |
|     if (args.size < 1)
 | |
|     {
 | |
|         return NotEnoughArgsError(1);
 | |
|     }
 | |
| 
 | |
|     error = ToggleNoTarget(args[0]);
 | |
| 
 | |
|     if (IsDefined(error))
 | |
|     {
 | |
|         return error;
 | |
|     }
 | |
| }
 | |
| 
 | |
| 
 | |
| 
 | |
| /* Logic section */
 | |
| 
 | |
| ToggleNoTarget(playerName)
 | |
| {
 | |
|     player = FindPlayerByName(playerName);
 | |
| 
 | |
|     if (!IsDefined(player))
 | |
|     {
 | |
|         return PlayerDoesNotExistError(playerName);
 | |
|     }
 | |
| 
 | |
|     commandName = "notarget";
 | |
| 
 | |
|     ToggleStatus(commandName, "No Target", player);
 | |
| 
 | |
|     player.ignoreme = GetStatus(commandName, player);
 | |
| } |