mirror of
				https://github.com/Resxt/Plutonium-T6-Scripts.git
				synced 2025-10-30 17:36:58 +00:00 
			
		
		
		
	chat_commands 1.0.2
Added default 1s wait time to TellPlayer in case no wait time is passed Added TellAllPlayers util function Added InvalidRoundError error
This commit is contained in:
		| @@ -270,6 +270,11 @@ ChatListener() | ||||
|  | ||||
| TellPlayer(messages, waitTime, isCommand) | ||||
| { | ||||
|     if (!IsDefined(waitTime)) | ||||
|     { | ||||
|         waitTime = 1; | ||||
|     } | ||||
|      | ||||
|     for (i = 0; i < messages.size; i++) | ||||
|     { | ||||
|         message = messages[i]; | ||||
| @@ -288,6 +293,19 @@ TellPlayer(messages, waitTime, isCommand) | ||||
|     } | ||||
| } | ||||
|  | ||||
| TellAllPlayers(messages, waitTime) | ||||
| { | ||||
|     if (!IsDefined(waitTime)) | ||||
|     { | ||||
|         waitTime = 1; | ||||
|     } | ||||
|  | ||||
|     foreach (player in level.players) | ||||
|     { | ||||
|         player TellPlayer(messages, waitTime, false); | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /* Player section */ | ||||
| @@ -361,6 +379,11 @@ DvarDoesNotExistError(dvarName) | ||||
|     return array("The dvar " + dvarName + " doesn't exist"); | ||||
| } | ||||
|  | ||||
| InvalidRoundError(roundNumber) | ||||
| { | ||||
|     return array(roundNumber + " is not a valid round number"); | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| /* Utils section */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user